Skip to content

Upgrading css-loader 6 to 7

Breaking6.11.0 → 7.1.5Breaking2Platform2New2Changed1Fixed7

BreakingUpgrade verdict

2 breaking changes and 2 platform requirement changes.

  • If you turn on ES modules, CSS class names are now exported as named exports instead of a default object, so import statements must change.
  • When named exports are on, class names keep their original spelling by default instead of being converted.
  • This release lets the loader work with version 2 of the Rspack core package.
  • You need at least Node.js 18.12.0 to use this version.
4 items need code or config changes

Node.js requirement changed in 7.0.0: >= 12.13.0 → >= 18.12.0.

Breaking2
The modules.namedExport option defaults to true when the esModule option is enabled.
modules.namedExportesModule
modules.exportLocalsConvention defaults to as-is when modules.namedExport is true and no value is specified.
modules.exportLocalsConventionmodules.namedExport
Platform2
Updates the peer dependency range to support @rspack/core v2.
@rspack/core
Minimum supported Node.js version is now 18.12.0.