-
-
Notifications
You must be signed in to change notification settings - Fork 577
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: chunk render cache panic on css extract diagnostics (#8562)
- Loading branch information
Showing
23 changed files
with
121 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/0/a.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
content: "a"; | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/0/ab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./a.css" | ||
import "./b.css" |
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/0/b.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
content: "b"; | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/0/ba.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./b.css" | ||
import "./a.css" |
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/0/warnings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = [ | ||
/Conflicting order\. Following module has been added/, | ||
] |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/1/ab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// import "./a.css" | ||
import "./b.css" |
1 change: 1 addition & 0 deletions
1
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/1/warnings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = [] |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/2/ab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./a.css" | ||
import "./b.css" |
42 changes: 42 additions & 0 deletions
42
...es/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/rspack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const rspack = require("@rspack/core"); | ||
|
||
/** @type {import("@rspack/core").Configuration} */ | ||
module.exports = { | ||
entry: { | ||
ab: './ab.js', | ||
ba: './ba.js', | ||
}, | ||
output: { | ||
filename: '[name].js' | ||
}, | ||
optimization: { | ||
splitChunks: { | ||
cacheGroups: { | ||
styles: { | ||
name: "styles", | ||
chunks: "all", | ||
test: /\.css$/, | ||
enforce: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
new rspack.CssExtractRspackPlugin({ ignoreOrder: false }), | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [ | ||
rspack.CssExtractRspackPlugin.loader, | ||
"css-loader", | ||
], | ||
type: "javascript/auto", | ||
}, | ||
], | ||
}, | ||
experiments: { | ||
css: false, | ||
}, | ||
}; |
5 changes: 5 additions & 0 deletions
5
...ages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-css-extract/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
findBundle(i) { | ||
return ["ab.js", "ba.js"]; | ||
}, | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/0/a.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
content: "a"; | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/0/ab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./a.css" | ||
import "./b.css" |
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/0/b.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
content: "b"; | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/0/ba.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./b.css" | ||
import "./a.css" |
3 changes: 3 additions & 0 deletions
3
...s/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/0/warnings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = [ | ||
/Conflicting order between/, | ||
] |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/1/ab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// import "./a.css" | ||
import "./b.css" |
1 change: 1 addition & 0 deletions
1
...s/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/1/warnings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = [] |
2 changes: 2 additions & 0 deletions
2
packages/rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/2/ab.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./a.css" | ||
import "./b.css" |
28 changes: 28 additions & 0 deletions
28
...spack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/rspack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const rspack = require("@rspack/core"); | ||
|
||
/** @type {import("@rspack/core").Configuration} */ | ||
module.exports = { | ||
entry: { | ||
ab: './ab.js', | ||
ba: './ba.js', | ||
}, | ||
output: { | ||
filename: '[name].js' | ||
}, | ||
target: "web", | ||
optimization: { | ||
splitChunks: { | ||
cacheGroups: { | ||
styles: { | ||
name: "styles", | ||
chunks: "all", | ||
test: /\.css$/, | ||
enforce: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
experiments: { | ||
css: true, | ||
}, | ||
}; |
5 changes: 5 additions & 0 deletions
5
.../rspack-test-tools/tests/watchCases/css/chunk-render-cache-experiments-css/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
findBundle(i) { | ||
return ["ab.js", "ba.js"]; | ||
}, | ||
} |
5f77de0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Ran ecosystem CI: Open