Skip to content

filter(webpack): add webpack build filter #45

@mpecan

Description

@mpecan

Goal

Add a filter for webpack and webpack-cli builds — a widely used JavaScript bundler that produces verbose asset and chunk tables even on successful builds.

Background

Default webpack output includes:

  • Full chunk dependency graphs listing every module in each chunk
  • Entrypoint tables showing all included assets
  • Per-asset size tables (useful once, noisy in CI on every build)
  • Plugin log messages (some plugins like mini-css-extract-plugin are notoriously verbose — community issue #496 titled "Output logging is too verbose")

Actual errors and warnings are interspersed with this structural output, making failures hard to spot.

Filters to Add

webpack/build.tomlwebpack / webpack-cli / webpack --mode production

  • Skip:
    • Module count lines (X modules)
    • Chunk entrypoint tables (lines under Entrypoint <name> =)
    • Asset size table lines when build succeeds (lines matching <asset> <size> <chunks>)
    • [webpack-dev-middleware] informational lines
  • Keep:
    • ERROR in lines with file reference
    • WARNING in lines (these are usually actionable)
    • webpack compiled with X errors or webpack compiled successfully summary
    • Lines referencing bundle size limit exceeded warnings

webpack/watch.tomlwebpack --watch / webpack serve

  • Skip: routine recompile start/end messages when no errors (webpack compiled successfully in Xms)
  • Keep: recompile messages that include errors or warnings, [HMR] disconnect/reconnect messages

Fixture Files Needed

  • tests/fixtures/webpack/build-success.txt — successful production build with full stats output
  • tests/fixtures/webpack/build-errors.txt — build with module errors
  • tests/fixtures/webpack/build-warnings.txt — build with size limit warnings

Acceptance Criteria

  • Asset/chunk tables removed from successful build output
  • ERROR in and WARNING in lines always preserved
  • Build outcome summary line always preserved
  • Integration tests pass for all fixture files

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions