# css-loader: what changed from 6 to 7 - Product: css-loader (https://whatsnew.fyi/product/css-loader) - Vendor: css-loader - Range: changelog entries numbered after v6.11.0 up to and including v7.1.5, stable releases only - Entries below: 7 releases (newest first) - Resolved: 6 is v6.11.0 and 7 is v7.1.5, the newest stable release of each major we track - Carrying security changes: 0 · CVEs mentioned: 0 · Mentioning breaking changes: 1 · Removing or deprecating something: 0 - Page: https://whatsnew.fyi/product/css-loader/compare/6...7 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## What changed (14 changes, grouped by kind) ### Added #### v7.1.0 (2024-04-08) - Added the getJSON option to output CSS modules mapping #### v7.0.0 (2024-04-04) - The modules.namedExports option works fine with any modules.exportLocalsConvention values - Added dashed variants for the modules.exportLocalsConvention options ### Changed #### v7.0.0 (2024-04-04) - 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 #### v7.1.5 (2026-08-28) - strip BOM before processing with postcss #### v7.1.4 (2026-02-16) - update peer dependency for @rspack/core v2 #### v7.1.3 (2026-01-27) - Allow to use `module` class name - Use official `createHash` for hashes - Use official `hash*` options for hashes #### v7.1.2 (2024-05-22) - keep order of @import statements with the webpackIgnore comment #### v7.1.1 (2024-04-10) - automatically rename class `default` to `_default` when named export is enabled ## Release notes ### v7.1.5 - Date: 2026-08-28 - Version: v7.1.5 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.1.5 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.1.5 - **fixed** — strip BOM before processing with postcss ###### [7.1.5](https://github.com/webpack/css-loader/compare/v7.1.4...v7.1.5) (2026-08-28) ###### Bug Fixes * strip BOM before processing with postcss ([#1684](https://github.com/webpack/css-loader/issues/1684)) ([bd20834](https://github.com/webpack/css-loader/commit/bd20834e02dc2b2da970e40f713c3e531513aa38)) ### v7.1.4 - Date: 2026-02-16 - Version: v7.1.4 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.1.4 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.1.4 - **fixed** — update peer dependency for @rspack/core v2 ###### [7.1.4](https://github.com/webpack/css-loader/compare/v7.1.3...v7.1.4) (2026-02-16) ###### Bug Fixes * update peer dependency for @rspack/core v2 ([#1652](https://github.com/webpack/css-loader/issues/1652)) ([aeddefe](https://github.com/webpack/css-loader/commit/aeddefee8feb6fe22dd3f98cd2fc2bac50dc7c45)) ### v7.1.3 - Date: 2026-01-27 - Version: v7.1.3 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.1.3 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.1.3 - **fixed** — Allow to use `module` class name - **fixed** — Use official `createHash` for hashes - **fixed** — Use official `hash*` options for hashes ###### [7.1.3](https://github.com/webpack/css-loader/compare/v7.1.2...v7.1.3) (2026-01-27) ###### Bug Fixes * allow to use `module` class name ([#1649](https://github.com/webpack/css-loader/issues/1649)) ([01869bc](https://github.com/webpack/css-loader/commit/01869bcace63d17c4bfafedbc29c11965e62360d)) * use official `createHash` for hashes ([#1618](https://github.com/webpack/css-loader/issues/1618)) ([06587e5](https://github.com/webpack/css-loader/commit/06587e54c6a580ee0c20e47021943aa9989acd5c)) * use official `hash*` options for hashes ([#1619](https://github.com/webpack/css-loader/issues/1619)) ([9544c3e](https://github.com/webpack/css-loader/commit/9544c3e9a90c1c58476d3d87188f8ff39105294f)) ### v7.1.2 - Date: 2024-05-22 - Version: v7.1.2 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.1.2 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.1.2 - **fixed** — keep order of @import statements with the webpackIgnore comment ###### [7.1.2](https://github.com/webpack-contrib/css-loader/compare/v7.1.1...v7.1.2) (2024-05-22) ###### Bug Fixes * keep order of `@import`s with the `webpackIgnore` comment ([#1600](https://github.com/webpack-contrib/css-loader/issues/1600)) ([76757ef](https://github.com/webpack-contrib/css-loader/commit/76757ef30ec37f88ccf9d8b82d8d84b7625c5d66)) ### v7.1.1 - Date: 2024-04-10 - Version: v7.1.1 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.1.1 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.1.1 - **fixed** — automatically rename class `default` to `_default` when named export is enabled ###### [7.1.1](https://github.com/webpack-contrib/css-loader/compare/v7.1.0...v7.1.1) (2024-04-10) ###### Bug Fixes * automatically rename class `default` to `_default` when named export is enabled ([#1590](https://github.com/webpack-contrib/css-loader/issues/1590)) ([d6c31a1](https://github.com/webpack-contrib/css-loader/commit/d6c31a17a0dde3e2bcf2b5e55f913c3645d32868)) ### v7.1.0 - Date: 2024-04-08 - Version: v7.1.0 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.1.0 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.1.0 - **added** — Added the getJSON option to output CSS modules mapping ##### [7.1.0](https://github.com/webpack-contrib/css-loader/compare/v7.0.0...v7.1.0) (2024-04-08) ###### Features * added the `getJSON` option to output CSS modules mapping ([#1577](https://github.com/webpack-contrib/css-loader/issues/1577)) ([af834b4](https://github.com/webpack-contrib/css-loader/commit/af834b43b375f336108d74ff7bd9ed13bc79200a)) ### v7.0.0 - Date: 2024-04-04 - Version: v7.0.0 - Original notes: https://github.com/webpack/css-loader/releases/tag/v7.0.0 - Permalink: https://whatsnew.fyi/product/css-loader/releases/v7.0.0 - **changed** — The modules.namedExport option is true by default if you enable the esModule option - **changed** — The modules.exportLocalsConvention has the value as-is when the modules.namedExport option is true and you don't specify a value - **changed** — Minimum supported webpack version is 5.27.0 - **changed** — Minimum supported Node.js version is 18.12.0 - **added** — The modules.namedExports option works fine with any modules.exportLocalsConvention values - **added** — Added dashed variants for the modules.exportLocalsConvention options ##### [7.0.0](https://github.com/webpack-contrib/css-loader/compare/v6.11.0...v7.0.0) (2024-04-04) ###### ⚠ BREAKING CHANGES * The `modules.namedExport` option is `true` by default if you enable the `esModule` option Migration guide: Before: ```js import style from "./style.css"; console.log(style.myClass); ``` After: ```js import * as style from "./style.css"; console.log(style.myClass); ``` Typescript migration: Before: ```ts declare module '*.module.css' { const classes: { [key: string]: string }; export default classes; } ``` After: ```ts 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](https://github.com/webpack-contrib/css-loader/commit/f96a11007da55a632de7f58167895e1b5814d717)) * Added dashed variants for the `modules.exportLocalsConvention` options ([40e1668](https://github.com/webpack-contrib/css-loader/commit/40e1668b8366f0df63343efe706ba848c2b5dfb2))