unstale

npm / webpack-cli

webpack-cli

What changed in webpack-cli 4 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

22 breaking5 new APIs and options4 performance11 behavior and defaults5 tooling11 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

webpack-cli 727 changes

Breaking changes 4

  • This argument replaces the removed --node-env argument.

    7.0.0release notes

  • The minimum supported Node.js version is now 20.9.0.

    7.0.0release notes

  • The --node-env argument was removed in favor of --config-node-env.

    7.0.0release notes

  • The deprecated API was removed; users importing or requiring webpack-cli as cli may need to change their usage.

    7.0.0release notes

New APIs and options 3

  • Adds shell completions for zsh, bash, fish, and powershell through this command.

    7.3.0release notes

  • In multi-compiler mode, this option makes each dev server serve only the compiler from its own configuration instead of serving all compilers by default.

    7.3.0release notes

  • Configuration files can now use JSON5, YAML or TOML; the corresponding parser package must be installed by the user.

    7.1.0release notes

Performance 4

  • Shares the compile cache with child processes and worker threads, such as minimizer workers, so they start warm too.

    7.3.0release notes

  • Enables the Node.js compile cache to speed up CLI startup; it is available on Node.js >= 22.8.0.

    7.2.2release notes

  • CLI startup uses less CPU and memory, so commands start more efficiently.

    7.0.3release notes

  • Performance improved.

    7.0.0release notes

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.

    7.1.0release notes

  • The file protocol is now supported for the --config and --extends configuration options.

    7.0.1release notes

  • Configuration freezing is now allowed.

    7.0.0release notes

  • The CLI uses graceful shutdown when file system cache is enabled.

    7.0.0release notes

  • The command now outputs versions only.

    7.0.0release notes

  • 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.

    7.0.0release notes

Tooling 4

  • With webpack-dev-server@6, the CLI drives watch compilation, prints build stats, and closes the compiler on shutdown; older dev servers continue to manage their own compilation.

    7.3.0release notes

  • Allow toml@5 as a peer dependency for TOML configuration files.

    7.2.3release notes

  • 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.

    7.2.0release notes

  • webpack-dev-server v6 is now supported as an optional peer dependency, alongside v5.

    7.2.0release notes

Fixes and other changes 6

  • The CLI detects unavailable package managers and failed installations, choosing an installed alternative instead of npm when appropriate and stopping after an installation fails.

    7.3.1release notes

  • Dev servers for configurations that share the same object are assigned distinct ports.

    7.3.0release notes

  • Keeps this multi-compiler option set on a configuration array when --config-name or extends rebuilds it.

    7.3.0release notes

  • Resolve the webpack-dev-server type from its default export so the types work with both v5 and v6.

    7.2.3release notes

  • Fixes dynamic import interop for CLIPlugin under Bun.

    7.2.1release notes

  • Resolves the configuration path for cache build dependencies.

    4.0.0, 7.0.2release notesupgrade guide

webpack-cli 614 changes

Breaking changes 8

  • The --define-process-env-node-env option was renamed to --config-node-env.

    6.0.0release notes

  • The CLI no longer serves when dev-server is false.

    6.0.0release notes

  • The init command was removed in favor of create-webpack-app.

    6.0.0release notes

  • The loader command was removed in favor of create-webpack-app.

    6.0.0release notes

  • The minimum required Node.js version is now 18.12.0.

    6.0.0release notes

  • The minimum supported webpack version is now 5.82.0.

    6.0.0release notes

  • The plugin command was removed in favor of create-webpack-app.

    6.0.0release notes

  • Support for webpack-dev-server v4 was dropped.

    6.0.0release notes

Behavior and default changes 4

  • Shutdown behavior was improved to shut down gracefully.

    6.0.0release notes

  • The info command now outputs the pnpm version.

    6.0.0release notes

  • The version command now outputs the pnpm version.

    6.0.0release notes

  • webpack.config.js can now be required in ESM format.

    6.0.0release notes

Tooling 1

  • Help output now better presents possible values.

    6.0.0release notes

Fixes and other changes 1

webpack-cli 513 changes

Breaking changes 9

  • Adds an option for setting process.env.NODE_ENV; it replaces --node-env.

    5.0.0release notes

  • The --entry option now adds a specified entry instead of replacing existing entries; use --entry-reset to restore the previous behavior.

    5.0.0release notes

  • Removes --hot for the build command in favor of using HotModuleReplacement directly; it continues to work for serve.

    5.0.0release notes

  • Removes the migrate command.

    5.0.0release notes

  • webpack-cli no longer supports webpack-dev-server v3; webpack-dev-server v4.0.0 is the minimum supported version.

    5.0.0release notes

  • webpack-cli no longer supports webpack v4; webpack v5.0.0 is the minimum supported version.

    5.0.0release notes

  • Removes --node-env in favor of --define-process-env-node-env.

    5.0.0release notes

  • Removes --prefetch in favor of the PrefetchPlugin plugin.

    5.0.0release notes

  • Removes the redundant utils export.

    5.0.0release notes

New APIs and options 2

Behavior and default changes 1

  • The minimum help output now shows all CLI-specific flags.

    5.0.0release notes

Fixes and other changes 1

  • webpack-cli now respects the NODE_PATH environment variable.

    5.0.0release notes

webpack-cli 44 changes

Breaking changes 1

Fixes and other changes 3