npm / cssnano
cssnano
What changed in cssnano 9, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
5 breaking1 deprecations4 behavior and defaults1 tooling2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcssnano 913 changes
Breaking changes 5
Projects that require this package directly must declare it as a dependency or switch to the default preset configuration.
Overrides that pin an individual plugin no longer apply.
Resolutions that pin an individual plugin no longer apply.
The presets no longer run postcss-svgo; run it before cssnano or optimize SVG assets with the SVGO cli instead.
The svgo option is now ignored, so it no longer configures SVG optimization through the preset.
Deprecations 1
An installed preset package takes precedence over the built-in preset and prints a one-time warning; pass the imported preset function to avoid it.
Behavior and default changes 4
Full preset names fall back to the built-in preset when the corresponding package is not installed.
Always converts between cm and mm, and converts q to cm or mm; q is never the output unit.
Merges at-rules separated by unrelated rules.
Drops a min-* or max-* already implied in another range in the same media query.
Tooling 1
cssnano ships its presets and plugins in one package, reducing the dependency tree from about thirty packages to one.
Fixes and other changes 2
The lite and advanced presets work without installing another package.
Only the url() token is normalized; URLs remain byte-identical, and whitespace inside quoted @namespace URLs is preserved.