-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
355f729
commit c377aed
Showing
18 changed files
with
529 additions
and
761 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
test/cases/js-hash/expected/webpack-5-importModule/style.43ad9cd468159815bd3e.1.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,4 @@ | ||
.HwLaWYab_FINAuqviT6T { | ||
background: red; | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
...rtModule/style.cee668336e0f53d4ab8e.2.css → ...rtModule/style.bf54e341e5d75d24c387.2.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
.Z_E0RPEyV1Psn6SZX9qd { | ||
.HwLaWYab_FINAuqviT6T { | ||
background: green; | ||
} | ||
|
4 changes: 0 additions & 4 deletions
4
test/cases/js-hash/expected/webpack-5-importModule/style.ff389914a5cf993f5135.1.css
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/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 @@ | ||
.class_a { | ||
background: red; | ||
} |
4 changes: 4 additions & 0 deletions
4
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/a.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,4 @@ | ||
import "./common.css"; | ||
import "./a.css"; | ||
|
||
import(/* webpackChunkName: "comp1" */ "./components/comp1"); |
3 changes: 3 additions & 0 deletions
3
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/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 @@ | ||
.class_b { | ||
background: red; | ||
} |
4 changes: 4 additions & 0 deletions
4
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/b.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,4 @@ | ||
import "./common.css"; | ||
import "./b.css"; | ||
|
||
import(/* webpackChunkName: "comp2" */ "./components/comp2"); |
3 changes: 3 additions & 0 deletions
3
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/common.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 @@ | ||
.common { | ||
background: red; | ||
} |
3 changes: 3 additions & 0 deletions
3
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.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 { | ||
background-color: yellow; | ||
} |
1 change: 1 addition & 0 deletions
1
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp1.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 @@ | ||
import "./comp1.css"; |
3 changes: 3 additions & 0 deletions
3
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.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 { | ||
background-color: green; | ||
} |
1 change: 1 addition & 0 deletions
1
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/components/comp2.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 @@ | ||
import "./comp2.css"; |
4 changes: 4 additions & 0 deletions
4
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp1.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,4 @@ | ||
body { | ||
background-color: yellow; | ||
} | ||
|
4 changes: 4 additions & 0 deletions
4
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/comp2.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,4 @@ | ||
body { | ||
background-color: green; | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_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,8 @@ | ||
.common { | ||
background: red; | ||
} | ||
|
||
.class_a { | ||
background: red; | ||
} | ||
|
8 changes: 8 additions & 0 deletions
8
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/expected/styles_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,8 @@ | ||
.common { | ||
background: red; | ||
} | ||
|
||
.class_b { | ||
background: red; | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
test/cases/split-chunks-based-on-entry-with-common-in-each-chunk/webpack.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,35 @@ | ||
import Self from "../../../src"; | ||
|
||
module.exports = { | ||
entry: { | ||
a: "./a.js", | ||
b: "./b.js", | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [Self.loader, "css-loader"], | ||
}, | ||
], | ||
}, | ||
optimization: { | ||
splitChunks: { | ||
cacheGroups: { | ||
aStyles: { | ||
type: "css/mini-extract", | ||
name: "styles_a", | ||
chunks: (chunk) => chunk.name === "a", | ||
enforce: true, | ||
}, | ||
bStyles: { | ||
type: "css/mini-extract", | ||
name: "styles_b", | ||
chunks: (chunk) => chunk.name === "b", | ||
enforce: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
plugins: [new Self()], | ||
}; |