What changed in css-loader from 6 to 7

7 releases numbered after v6.11.0 up to and including v7.1.5, stable releases only. v6.11.0 and v7.1.5 are the newest stable releases of 6 and 7 we track; this page follows them as new ones ship.

14 changes across 7 releases

Added 3

v7.1.0

  • Added the getJSON option to output CSS modules mapping

v7.0.0

  • The modules.namedExports option works fine with any modules.exportLocalsConvention values
  • Added dashed variants for the modules.exportLocalsConvention options
Changed 4

v7.0.0

  • The modules.namedExport option is true by default if you enable the esModule option
  • The modules.exportLocalsConvention has the value as-is when the modules.namedExport option is true and you don't specify a value
  • Minimum supported webpack version is 5.27.0
  • Minimum supported Node.js version is 18.12.0
Fixed 7

v7.1.5

  • strip BOM before processing with postcss

v7.1.4

  • update peer dependency for @rspack/core v2

v7.1.3

  • Allow to use `module` class name
  • Use official `createHash` for hashes
  • Use official `hash*` options for hashes

v7.1.2

  • keep order of @import statements with the webpackIgnore comment

v7.1.1

  • automatically rename class `default` to `_default` when named export is enabled

Original release notes, newest first

The list above is our reading of these notes; the originals from css-loader are here, one fold per release.

v7.1.5
7.1.5 (2026-08-28)
Bug Fixes
  • strip BOM before processing with postcss (#1684) (bd20834)

View originalPermalink

v7.1.4
7.1.4 (2026-02-16)
Bug Fixes
  • update peer dependency for @rspack/core v2 (#1652) (aeddefe)

View originalPermalink

v7.1.3
7.1.3 (2026-01-27)
Bug Fixes

View originalPermalink

v7.1.2
7.1.2 (2024-05-22)
Bug Fixes
  • keep order of @imports with the webpackIgnore comment (#1600) (76757ef)

View originalPermalink

v7.1.1
7.1.1 (2024-04-10)
Bug Fixes
  • automatically rename class default to _default when named export is enabled (#1590) (d6c31a1)

View originalPermalink

v7.1.0
7.1.0 (2024-04-08)
Features
  • added the getJSON option to output CSS modules mapping (#1577) (af834b4)

View originalPermalink

v7.0.0
7.0.0 (2024-04-04)
⚠ BREAKING CHANGES
  • The modules.namedExport option is true by default if you enable the esModule option

Migration guide:

Before:

import style from "./style.css";

console.log(style.myClass);

After:

import * as style from "./style.css";

console.log(style.myClass);

Typescript migration:

Before:

declare module '*.module.css' {
  const classes: { [key: string]: string };
  export default classes;
}

After:

declare module '*.module.css' {
  const classes: { [key: string]: string };
  export = classes;
}
  • The modules.exportLocalsConvention has the value as-is when the modules.namedExport option is true and you don't specify a value
  • Minimum supported webpack version is 5.27.0
  • Minimum supported Node.js version is 18.12.0
Features
  • The modules.namedExports option works fine with any modules.exportLocalsConvention values (f96a110)
  • Added dashed variants for the modules.exportLocalsConvention options (40e1668)

View originalPermalink