Upgrading css-loader 6 to 7
Breaking6.11.0 → 7.1.5Breaking2Platform2New2Changed1Fixed7
BreakingUpgrade verdict
2 breaking changes and 2 platform requirement changes.
In plain terms
- 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.
Must act 4 items need code or config changes
Node.js requirement changed in 7.0.0: >= 12.13.0 → >= 18.12.0.
What you must change
Breaking2
The modules.namedExport option defaults to true when the esModule option is enabled.
modules.namedExportesModulemodules.exportLocalsConvention defaults to as-is when modules.namedExport is true and no value is specified.
modules.exportLocalsConventionmodules.namedExportPlatform2
Updates the peer dependency range to support @rspack/core v2.
@rspack/coreMinimum supported Node.js version is now 18.12.0.