Update dependency css-loader to v7
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
css-loader | devDependencies | major | ^6.0.0 -> ^7.0.0 |
Release Notes
webpack-contrib/css-loader
v7.1.2
v7.1.1
v7.1.0
Features
v7.0.0
⚠ BREAKING CHANGES
- The
modules.namedExport
option istrue
by default if you enable theesModule
option
Migration guide:
Before:
import style from "./style.css";
console.log(style.myClass);
After:
import * as style from "./style.css";
console.log(style.myClass);
To restore 6.x behavior, please use:
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
loader: "css-loader",
options: {
modules: {
namedExport: false,
exportLocalsConvention: 'as-is',
//
// or, if you prefer camelcase style
//
// exportLocalsConvention: 'camel-case-only'
},
},
},
],
},
};
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 valueas-is
when themodules.namedExport
option istrue
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 anymodules.exportLocalsConvention
values (f96a110) - Added dashed variants for the
modules.exportLocalsConvention
options (40e1668)
v6.11.0
Features
Bug Fixes
v6.10.0
Features
- add
@rspack/core
as an optional peer dependency (#1568) (3924679) - pass the
resourceQuery
andresourceFragment
to theauto
andmode
callback (#1569) (d641c4d) - support named exports with any characters (6f43929)
6.9.1 (2024-01-18)
Bug Fixes
- css nesting support
-
@scope
at-rule support
v6.9.1
v6.9.0
Features
Bug Fixes
6.8.1 (2023-05-28)
Bug Fixes
v6.8.1
v6.8.0
Features
- use template literal when it possible to prevent
Maximum call stack size exceeded
(#1525) (6eb5661)
Bug Fixes
6.7.4 (2023-05-19)
Bug Fixes
6.7.3 (2022-12-14)
Bug Fixes
6.7.2 (2022-11-13)
Bug Fixes
6.7.1 (2022-03-08)
Bug Fixes
v6.7.4
v6.7.3
v6.7.2
v6.7.1
v6.7.0
Features
v6.6.0
Features
- added the
hashStrategy
option (ca4abce)
6.5.1 (2021-11-03)
Bug Fixes
v6.5.1
v6.5.0
Features
Bug Fixes
- respect
nosources
in thedevtool
option (c60eff2)
v6.4.0
Features
- generate more collision resistant for locals (c7db752)
Bug Fixes
- classes generation for client and server bundling (303a3a1)
v6.3.0
Features
- added
[folder]
placeholder (a0dee4f) - added the
exportType
option with'array'
,'string'
and'css-style-sheet'
values (c6d2066)-
'array'
- the default export isArray
with API forstyle-loader
and other -
'string'
- the default export isString
you don't needto-string-loader
loader anymore -
'css-style-sheet'
- the default export is aconstructable stylesheet
, you can useimport sheet from './styles.css' assert { type: 'css' };
like in a browser, more information you can find here
-
- supported
supports()
andlayer()
functions in@import
at-rules (#1377) (bce2c17) - fix multiple merging multiple
@media
at-rules (#1377) (bce2c17)
Bug Fixes
v6.2.0
Features
- allow the
exportLocalsConvention
option can be a function, useful for named export (#1351) (3c4b357)
v6.1.0
Features
Bug Fixes
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.
Edited by Tine Wittler