npm / webpack-cli
webpack-cli
What changed in webpack-cli 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
4 breaking1 new APIs and options3 performance6 behavior and defaults3 tooling3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initwebpack-cli 720 changes
Breaking changes 4
This argument replaces the removed
--node-envargument.The minimum supported Node.js version is now 20.9.0.
The
--node-envargument was removed in favor of--config-node-env.The deprecated API was removed; users importing or requiring
webpack-cliasclimay need to change their usage.
New APIs and options 1
Configuration files can now use JSON5, YAML or TOML; the corresponding parser package must be installed by the user.
Performance 3
Enables the Node.js compile cache to speed up CLI startup; it is available on Node.js >= 22.8.0.
CLI startup uses less CPU and memory, so commands start more efficiently.
Performance improved.
Behavior and default changes 6
The help output now has branded headers, section dividers, colorized terms and a clearer footer; colors and chrome become plain text when output is piped or --no-color is used.
The file protocol is now supported for the --config and --extends configuration options.
Configuration freezing is now allowed.
The CLI uses graceful shutdown when file system cache is enabled.
The command now outputs versions only.
The CLI uses dynamic import to load the configuration, falling back to interpretation when dynamic import cannot load it; this allows use of Node.js's built-in TypeScript support.
Tooling 3
Allow toml@5 as a peer dependency for TOML configuration files.
tsx is used as a fallback loader for TypeScript and JSX configuration files when no loader known to interpret, such as ts-node, is installed.
webpack-dev-server v6 is now supported as an optional peer dependency, alongside v5.
Fixes and other changes 3
Resolve the webpack-dev-server type from its default export so the types work with both v5 and v6.
Fixes dynamic import interop for CLIPlugin under Bun.
Resolves the configuration path for cache build dependencies.