Skip to content

Commit be7269d

Browse files
test: issue 847
1 parent def7eff commit be7269d

15 files changed

+1216
-943
lines changed

package-lock.json

+1,149-922
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
"file-loader": "^6.2.0",
6767
"husky": "^7.0.0",
6868
"jest": "^27.0.6",
69-
"jsdom": "^17.0.0",
69+
"jsdom": "^18.0.0",
7070
"lint-staged": "^11.1.1",
7171
"memfs": "^3.0.2",
7272
"npm-run-all": "^4.1.5",
7373
"prettier": "^2.3.2",
7474
"sass": "^1.39.0",
7575
"sass-loader": "^12.1.0",
7676
"standard-version": "^9.3.0",
77-
"webpack": "^5.57.0",
77+
"webpack": "^5.58.1",
7878
"webpack-cli": "^4.7.2",
7979
"webpack-dev-server": "^4.0.0"
8080
},

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ exports[`emit option should work with locals and invalidate cache when emit opti
5959
<style id=\\"existing-style\\">.existing { color: yellow }</style>
6060
</head>
6161
<body>
62-
css.foo: _j5iSDzArNaAORnv69Hc
63-
css.bar: _67eKd1itMUfuf44nULs
64-
css.baz: LKUNJg6Lwx8xCP4tSrpx
62+
css.foo: uC86G4ZAUGUNgZ_8kGoW
63+
css.bar: gaVCpLpTGYrkNPCq0Aat
64+
css.baz: L2DsMGOk1eHgwznhgQ5Z
6565
</body></html>"
6666
`;
6767
@@ -71,9 +71,9 @@ exports[`emit option should work with locals and invalidate cache when emit opti
7171
<style id=\\"existing-style\\">.existing { color: yellow }</style>
7272
</head>
7373
<body>
74-
css.foo-bar: NH8sk9tb8n5DoIapJHBV
75-
css.bar: _67eKd1itMUfuf44nULs
76-
css.baz: LKUNJg6Lwx8xCP4tSrpx
74+
css.foo-bar: zXlHvQRDVIOOddpg43og
75+
css.bar: gaVCpLpTGYrkNPCq0Aat
76+
css.baz: L2DsMGOk1eHgwznhgQ5Z
7777
</body></html>"
7878
`;
7979
@@ -115,9 +115,9 @@ exports[`emit option should work with locals when emit option is "false": DOM 1`
115115
<style id=\\"existing-style\\">.existing { color: yellow }</style>
116116
</head>
117117
<body>
118-
css.foo: _j5iSDzArNaAORnv69Hc
119-
css.bar: _67eKd1itMUfuf44nULs
120-
css.baz: LKUNJg6Lwx8xCP4tSrpx
118+
css.foo: uC86G4ZAUGUNgZ_8kGoW
119+
css.bar: gaVCpLpTGYrkNPCq0Aat
120+
css.baz: L2DsMGOk1eHgwznhgQ5Z
121121
</body></html>"
122122
`;
123123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.color {
2+
color: red;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
body {
2+
background: red;
3+
}
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import "./style.css";
2+
import "./other.ext";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.color {
2+
color: red;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background: red;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import Self from "../../../src";
2+
3+
module.exports = {
4+
entry: "./index.js",
5+
module: {
6+
rules: [
7+
{
8+
oneOf: [
9+
{
10+
test: /\.css$/,
11+
use: [
12+
{
13+
loader: Self.loader,
14+
},
15+
"css-loader",
16+
],
17+
},
18+
{
19+
exclude: /\.(js|mjs|jsx|ts|tsx)$/,
20+
type: "asset/resource",
21+
},
22+
],
23+
},
24+
],
25+
},
26+
plugins: [
27+
new Self({
28+
filename: "[name].css",
29+
}),
30+
],
31+
};

test/cases/js-hash/expected/webpack-5-importModule/style.43ad9cd468159815bd3e.1.css

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.y47aAtdWkILSHa01rP4B {
2+
background: red;
3+
}
4+
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
.HwLaWYab_FINAuqviT6T {
2+
.y47aAtdWkILSHa01rP4B {
33
background: green;
44
}
55

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.y47aAtdWkILSHa01rP4B {
2+
background: red;
3+
}
4+

test/cases/js-hash/expected/webpack-5/style.8406295479af8ab6e76a.1.css

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
.Hm__zqGZU_G0Lp44yFFz {
2+
.y47aAtdWkILSHa01rP4B {
33
background: green;
44
}
55

0 commit comments

Comments
 (0)