Skip to content

Commit 289192e

Browse files
committed
chore: resolve conflicts from merge with master
2 parents fd3fce8 + 95cf5c5 commit 289192e

File tree

12 files changed

+228
-27
lines changed

12 files changed

+228
-27
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [6.11.0](https://github.com/webpack-contrib/css-loader/compare/v6.10.0...v6.11.0) (2024-04-03)
6+
7+
8+
### Features
9+
10+
* supports multiple composes ([#1582](https://github.com/webpack-contrib/css-loader/issues/1582)) ([bbca614](https://github.com/webpack-contrib/css-loader/commit/bbca61411dc5f82964653a6d1aa27854519b743d))
11+
12+
13+
### Bug Fixes
14+
15+
* do not break `@scope` at-rule without params ([#1581](https://github.com/webpack-contrib/css-loader/issues/1581)) ([e022e3b](https://github.com/webpack-contrib/css-loader/commit/e022e3bb405472ac7d51ff1114783fc2811dfe04))
16+
517
## [6.10.0](https://github.com/webpack-contrib/css-loader/compare/v6.9.1...v6.10.0) (2024-01-30)
618

719

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,15 @@ To import a local classname from another module.
498498

499499
To import from multiple modules use multiple `composes:` rules.
500500

501+
```css
502+
:local(.className) {
503+
composes: edit highlight from "./edit.css", button from "module/button.css", classFromThisModule;
504+
background: red;
505+
}
506+
```
507+
508+
or
509+
501510
```css
502511
:local(.className) {
503512
composes: edit highlight from "./edit.css";

package-lock.json

Lines changed: 32 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "css-loader",
3-
"version": "6.10.0",
3+
"version": "6.11.0",
44
"description": "css loader module for webpack",
55
"license": "MIT",
66
"repository": "webpack-contrib/css-loader",
@@ -57,9 +57,9 @@
5757
"dependencies": {
5858
"icss-utils": "^5.1.0",
5959
"postcss": "^8.4.33",
60-
"postcss-modules-extract-imports": "^3.0.0",
61-
"postcss-modules-local-by-default": "^4.0.4",
62-
"postcss-modules-scope": "^3.1.1",
60+
"postcss-modules-extract-imports": "^3.1.0",
61+
"postcss-modules-local-by-default": "^4.0.5",
62+
"postcss-modules-scope": "^3.2.0",
6363
"postcss-modules-values": "^4.0.0",
6464
"postcss-value-parser": "^4.2.0",
6565
"semver": "^7.5.4"

test/__snapshots__/modules-option.test.js.snap

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10468,6 +10468,12 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`@scope (.kthHR5ALtmYK9QgapjA3) {
1046810468
color: plum;
1046910469
}
1047010470
}
10471+
10472+
@scope() {
10473+
:scope {
10474+
color: red;
10475+
}
10476+
}
1047110477
\`, \\"\\"]);
1047210478
// Exports
1047310479
___CSS_LOADER_EXPORT___.locals = {
@@ -10502,6 +10508,12 @@ Array [
1050210508
color: plum;
1050310509
}
1050410510
}
10511+
10512+
@scope() {
10513+
:scope {
10514+
color: red;
10515+
}
10516+
}
1050510517
",
1050610518
"",
1050710519
],
@@ -21104,6 +21116,59 @@ Array [
2110421116

2110521117
exports[`"modules" option should work with composes when the "namedExport" is enabled and "exportLocalsConvention" options has "dashesOnly" value: warnings 1`] = `Array []`;
2110621118

21119+
exports[`"modules" option should work with global compose: errors 1`] = `Array []`;
21120+
21121+
exports[`"modules" option should work with global compose: module 1`] = `
21122+
"// Imports
21123+
import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \\"../../../../src/runtime/noSourceMaps.js\\";
21124+
import ___CSS_LOADER_API_IMPORT___ from \\"../../../../src/runtime/api.js\\";
21125+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
21126+
// Module
21127+
___CSS_LOADER_EXPORT___.push([module.id, \`.global-class {
21128+
color: red;
21129+
}
21130+
21131+
.other-global-class {
21132+
color: red;
21133+
}
21134+
21135+
.oNDnA1BRHWFMyAdR4iF1 {
21136+
color: blue;
21137+
}
21138+
\`, \\"\\"]);
21139+
// Exports
21140+
___CSS_LOADER_EXPORT___.locals = {
21141+
\\"otherClassName\\": \`oNDnA1BRHWFMyAdR4iF1 global-class other-global-class\`
21142+
};
21143+
export default ___CSS_LOADER_EXPORT___;
21144+
"
21145+
`;
21146+
21147+
exports[`"modules" option should work with global compose: result 1`] = `
21148+
Array [
21149+
Array [
21150+
"./modules/composes/global.css",
21151+
".global-class {
21152+
color: red;
21153+
}
21154+
21155+
.other-global-class {
21156+
color: red;
21157+
}
21158+
21159+
.oNDnA1BRHWFMyAdR4iF1 {
21160+
color: blue;
21161+
}
21162+
",
21163+
"",
21164+
],
21165+
]
21166+
`;
21167+
21168+
exports[`"modules" option should work with global compose: warnings 1`] = `Array []`;
21169+
21170+
exports[`"modules" option should work with multiple compose: module 1`] = `undefined`;
21171+
2110721172
exports[`"modules" option should work with the "[local]" placeholder for the "localIdentName" option: errors 1`] = `Array []`;
2110821173

2110921174
exports[`"modules" option should work with the "[local]" placeholder for the "localIdentName" option: module 1`] = `
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.imported-alias-2 {
2+
background: red;
3+
}
4+
5+
.imported-alias-3 {
6+
background: red;
7+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:global(.global-class) {
2+
color: red;
3+
}
4+
5+
:global(.other-global-class) {
6+
color: red;
7+
}
8+
9+
.otherClassName {
10+
composes: global-class from global;
11+
composes: other-global-class from global;
12+
color: blue;
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import css from './global.css';
2+
3+
__export__ = css;
4+
5+
export default css;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.other-class {
2+
color: red;
3+
}
4+
5+
.class-1 {
6+
color: blue;
7+
}
8+
9+
.class-2 {
10+
color: blue;
11+
}
12+
13+
:global(.global-class) {
14+
padding: 10px;
15+
}
16+
17+
:global(.global-class-1) {
18+
padding: 10px;
19+
}
20+
21+
:global(.global-class-2) {
22+
padding: 10px;
23+
}
24+
25+
.class {
26+
composes:
27+
other-class,
28+
class-1 class-2,
29+
imported-alias from './alias.css',
30+
imported-alias-2 imported-alias-3 from './alias-1.css',
31+
global-class from global,
32+
global-class-1 global-class-2 from global;
33+
color: gainsboro;
34+
}
35+
36+
.class-other {
37+
composes: other-class class-1;
38+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import css from './multiple.css';
2+
3+
__export__ = css;
4+
5+
export default css;

0 commit comments

Comments
 (0)