Skip to content

Upgrading css-loader 4 to 5

Breaking4.3.0 → 5.2.7Breaking6New7Fixed15

BreakingUpgrade verdict

6 breaking changes.

  • returned value from the getLocalIdent escapes by default, the exportName value is always unescaped.
  • the icss option was removed (it was deprecated previously).
  • migrate on PostCSS 8.
  • runtime doesn't contain source maps code without sourceMap: true.
Top 3 of 6 that need code or config changes

Drops camelcase, cssesc.

Breaking6
returned value from the getLocalIdent escapes by default, the exportName value is always unescaped.
getLocalIdentexportName
the icss option was removed (it was deprecated previously).
icss
migrate on PostCSS 8.
runtime doesn't contain source maps code without sourceMap: true.
Auto enable icss modules for all files for which /\.icss\.\w+$/i is true (the modules.compileType option is icss).
/\.icss\.\w+$/itruemodules.compileTypeicss
[emoji] placeholder was deprecated.
[emoji]