unstale

npm / terser-webpack-plugin

terser-webpack-plugin

What changed in terser-webpack-plugin 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

3 deprecations5 new APIs and options1 performance2 behavior and defaults3 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

terser-webpack-plugin 514 changes

Deprecations 3

  • The project recommends switching to minimizer-webpack-plugin, a single plugin for minification that merges other minimizers and supports different minifier types in one instance.

    5.6.0release notes

  • minimizerOptions replaces terserOptions; terserOptions remains available as a deprecated alias.

    5.6.0release notes

  • terserOptions is deprecated in favor of minimizerOptions but remains available as an alias.

    5.6.0release notes

New APIs and options 5

  • Built-in CSS minimizers from css-minimizer-webpack-plugin are available in the plugin.

    5.6.0release notes

  • Minimizers gain a filter method, allowing one plugin instance to handle multiple asset types.

    5.6.0release notes

  • Built-in HTML minimizers from html-minimizer-webpack-plugin are available in the plugin.

    5.6.0release notes

  • The minify option now supports an array of minimizers, allowing multiple minimizers to be configured.

    5.6.0release notes

  • Adds the ability to minimize JSON using jsonMinify.

    5.4.0release notes

Performance 1

  • Deduplicating extracted comments now takes linear time, keeping builds fast when an asset contains many distinct preserved comments.

    5.6.1release notes

Behavior and default changes 2

  • The terserOptions option now supports an array of minimizers.

    5.6.0release notes

  • extractComments is now supported with swcMinify, allowing comments to be extracted when using the SWC minifier.

    5.5.0release notes

Fixes and other changes 3

  • Fixes handling of empty files.

    5.3.16release notes

  • Errors and warnings from a minimizer are respected when it returns no code.

    5.3.15release notes

  • Errors are caught when loading minimizers.

    5.3.15release notes