Webpack CLI
$ webpack Official Low RiskOfficial command-line runner (webpack-cli) for Webpack builds. Exposes webpack --json for full compilation stats/errors in JSON, --no-color for clean logs, and webpack configtest to validate webpack.config.js syntax without running a build.
npm install -g webpack webpack-cli Local asset bundler driven directly in Node.js repositories.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json, --no-color, and configtest, though full --json stats output is verbose and requires filtering with jq or writing to a file.
webpack --jsonoutputs structured stats/errorswebpack configtestvalidates configuration read-only
Local build tool with configtest validation, though evaluating webpack.config.js and loader plugins executes Node.js code.
- Read-only
configtestvalidation and scopeddist/output
Available everywhere Node.js runs via npm/npx across macOS, Linux, and Windows.
- Standard npm packages (
webpack+webpack-cli)
Mature, extensible bundler, though noticeably slower on large apps than Rust/Go successors like Rspack or esbuild.
- Extensive loader/plugin ecosystem with heavier build latency
Official OpenJS / Webpack project maintained under MIT.
- Official
webpack/webpack-clirepository
Comprehensive CLI documentation at webpack.js.org/api/cli/.
- Official Webpack CLI documentation
Security, Auth & Guardrails
No authentication required; reads local webpack.config.* and project sources.
MIT open-source CLI; completely free.
# Webpack CLI (webpack) Agent Rules - Use `webpack configtest` to check config changes before running a heavy bundle. - Pipe `--json` to a file (not raw stdout) because Webpack JSON stats can exceed context limits.
Agent-Ready Command Recipes
Safe Read-Only Queries
webpack configtest webpack.config.js
Loads and schema-validates the Webpack configuration without compiling bundles.
Controlled Writes & Previews
webpack --mode production --json --no-color > dist/stats.json
Compiles production assets and writes complete Webpack stats/errors JSON to dist/stats.json.
Strengths for Agents
- +
webpack --jsonexposes complete build stats, module graphs, and error objects. - +
webpack configtestvalidates configuration schema without compiling assets.
Caveats & Pitfalls
- !
webpack --jsonoutputs massive JSON payloads unless redirected or trimmed withjq. - ! Cold builds on large codebases can be slow and memory-intensive compared to Rspack.