# What changed in terser-webpack-plugin

> 14 changes in terser-webpack-plugin 5 from its official release notes, upgrade guides and advisories: 3 deprecations, 5 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/terser-webpack-plugin/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## terser-webpack-plugin 5

### Deprecations

- 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.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- minimizerOptions replaces terserOptions; terserOptions remains available as a deprecated alias. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- terserOptions is deprecated in favor of minimizerOptions but remains available as an alias. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)

### New APIs and options

- Built-in CSS minimizers from css-minimizer-webpack-plugin are available in the plugin. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- Minimizers gain a filter method, allowing one plugin instance to handle multiple asset types. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- Built-in HTML minimizers from html-minimizer-webpack-plugin are available in the plugin. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- The minify option now supports an array of minimizers, allowing multiple minimizers to be configured. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- Adds the ability to minimize JSON using jsonMinify. (5.4.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.4.0)

### Performance

- Deduplicating extracted comments now takes linear time, keeping builds fast when an asset contains many distinct preserved comments. (5.6.1) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.1)

### Behavior and default changes

- The terserOptions option now supports an array of minimizers. (5.6.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.6.0)
- extractComments is now supported with swcMinify, allowing comments to be extracted when using the SWC minifier. (5.5.0) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.5.0)

### Fixes and other changes

- Fixes handling of empty files. (5.3.16) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.3.16)
- Errors and warnings from a minimizer are respected when it returns no code. (5.3.15) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.3.15)
- Errors are caught when loading minimizers. (5.3.15) — [release notes](https://github.com/webpack/minimizer-webpack-plugin/releases/tag/v5.3.15)
