Skip to content

Commit c3fd459

Browse files
test: more (webpack-contrib#951)
1 parent e8c8796 commit c3fd459

File tree

6 files changed

+62
-31
lines changed

6 files changed

+62
-31
lines changed

package-lock.json

+13-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"normalize-path": "^3.0.0",
4949
"postcss": "^7.0.14",
5050
"postcss-modules-extract-imports": "^2.0.0",
51-
"postcss-modules-local-by-default": "^3.0.1",
51+
"postcss-modules-local-by-default": "^3.0.2",
5252
"postcss-modules-scope": "^2.1.0",
5353
"postcss-modules-values": "^3.0.0",
5454
"postcss-value-parser": "^4.0.0",

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

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ exports[`modules true (mode: local): module 1`] = `
1414
\\"v-primary\\": \\"#BF4040\\",
1515
\\"s-black\\": \\"black-selector\\",
1616
\\"m-large\\": \\"(min-width: 960px)\\",
17+
\\"v-string\\": \\"'my-content'\\",
18+
\\"v-empty-string\\": \\"''\\",
1719
\\"ghi\\": \\"_ghi\\",
1820
\\"class\\": \\"_class\\",
1921
\\"other\\": \\"_other\\",

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

+21-1
Original file line numberDiff line numberDiff line change
@@ -6093,6 +6093,24 @@ Array [
60936093
padding: 20px 20px;
60946094
}
60956095
}
6096+
6097+
a {
6098+
content: 'my-content';
6099+
}
6100+
6101+
@supports (content: 'my-content') {
6102+
a {
6103+
content: 'my-content';
6104+
}
6105+
}
6106+
6107+
[class~='my-content'] {
6108+
color:green;
6109+
}
6110+
6111+
a {
6112+
content: '';
6113+
}
60966114
",
60976115
"",
60986116
],
@@ -6112,7 +6130,7 @@ exports.i(require(\\"-!../../../src/index.js??ref--4-0!aliasesComposes/alias.css
61126130
exports.i(require(\\"-!../../../src/index.js??ref--4-0!./test-other.css\\"), \\"(min-width: 100px)\\");
61136131
61146132
// Module
6115-
exports.push([module.id, \\"._14uFt0lIVKKAlKTTT29IIQ {\\\\n color: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-def\\"] + \\";\\\\n}\\\\n\\\\n._3XDgIzfUIQkaUInpEdo7fN {\\\\n color: blue;\\\\n}\\\\n\\\\n._1wABXM_RabWHj--wsPrhvM {\\\\n display: block;\\\\n}\\\\n\\\\n._1DFEYnAfn9LZyk4fErI86e {\\\\n width: \\" + require(\\"-!../../../src/index.js??ref--4-0!./something.css\\").locals[\\"v-something\\"] + \\";\\\\n}\\\\n\\\\n.Ywv5coVC2RU-pIFhN9O4w {\\\\n color: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-other\\"] + \\";\\\\n}\\\\n\\\\n._1tAbIwITRWAdZZE6wKNk9O {\\\\n prop: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-def\\"] + \\";\\\\n duplicate: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-other\\"] + \\";\\\\n}\\\\n\\\\n.Q3SQ3BwtBwUFLlg6adzOI {\\\\n color: red;\\\\n}\\\\n\\\\n._1n5XhXj4SFnYrwziC3un0d {\\\\n color: yellow;\\\\n}\\\\n\\\\n._3dnFnGkAVAiMA6etF-naHc {\\\\n color: gray;\\\\n}\\\\n\\\\n._1xUePnlnafMQ1cExy3PUWT {\\\\n color: gray;\\\\n}\\\\n\\\\n._26Jdfenl9Xn8HXwb2jipvt {\\\\n color: gainsboro;\\\\n}\\\\n\\\\n._1ya4VhsDkuPhQeVHQydw2Y {\\\\n color: #BF4040;\\\\n}\\\\n\\\\n.sGE1Q_LliVEZU2Q4q9j4K {\\\\n color: black;\\\\n}\\\\n\\\\n@media (min-width: 960px) {\\\\n ._2zSMJ4hQh0FesbZjiKW_ya {\\\\n padding: 0 20px;\\\\n }\\\\n}\\\\n\\\\n.\\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"s-white\\"] + \\" {\\\\n color: white;\\\\n}\\\\n\\\\n@media \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"m-small\\"] + \\" {\\\\n ._2zSMJ4hQh0FesbZjiKW_ya {\\\\n padding: 20px 20px;\\\\n }\\\\n}\\\\n\\", \\"\\"]);
6133+
exports.push([module.id, \\"._14uFt0lIVKKAlKTTT29IIQ {\\\\n color: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-def\\"] + \\";\\\\n}\\\\n\\\\n._3XDgIzfUIQkaUInpEdo7fN {\\\\n color: blue;\\\\n}\\\\n\\\\n._1wABXM_RabWHj--wsPrhvM {\\\\n display: block;\\\\n}\\\\n\\\\n._1DFEYnAfn9LZyk4fErI86e {\\\\n width: \\" + require(\\"-!../../../src/index.js??ref--4-0!./something.css\\").locals[\\"v-something\\"] + \\";\\\\n}\\\\n\\\\n.Ywv5coVC2RU-pIFhN9O4w {\\\\n color: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-other\\"] + \\";\\\\n}\\\\n\\\\n._1tAbIwITRWAdZZE6wKNk9O {\\\\n prop: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-def\\"] + \\";\\\\n duplicate: \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"v-other\\"] + \\";\\\\n}\\\\n\\\\n.Q3SQ3BwtBwUFLlg6adzOI {\\\\n color: red;\\\\n}\\\\n\\\\n._1n5XhXj4SFnYrwziC3un0d {\\\\n color: yellow;\\\\n}\\\\n\\\\n._3dnFnGkAVAiMA6etF-naHc {\\\\n color: gray;\\\\n}\\\\n\\\\n._1xUePnlnafMQ1cExy3PUWT {\\\\n color: gray;\\\\n}\\\\n\\\\n._26Jdfenl9Xn8HXwb2jipvt {\\\\n color: gainsboro;\\\\n}\\\\n\\\\n._1ya4VhsDkuPhQeVHQydw2Y {\\\\n color: #BF4040;\\\\n}\\\\n\\\\n.sGE1Q_LliVEZU2Q4q9j4K {\\\\n color: black;\\\\n}\\\\n\\\\n@media (min-width: 960px) {\\\\n ._2zSMJ4hQh0FesbZjiKW_ya {\\\\n padding: 0 20px;\\\\n }\\\\n}\\\\n\\\\n.\\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"s-white\\"] + \\" {\\\\n color: white;\\\\n}\\\\n\\\\n@media \\" + require(\\"-!../../../src/index.js??ref--4-0!./values.css\\").locals[\\"m-small\\"] + \\" {\\\\n ._2zSMJ4hQh0FesbZjiKW_ya {\\\\n padding: 20px 20px;\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: 'my-content';\\\\n}\\\\n\\\\n@supports (content: 'my-content') {\\\\n a {\\\\n content: 'my-content';\\\\n }\\\\n}\\\\n\\\\n[class~='my-content'] {\\\\n color:green;\\\\n}\\\\n\\\\na {\\\\n content: '';\\\\n}\\\\n\\", \\"\\"]);
61166134
61176135
// Exports
61186136
exports.locals = {
@@ -6126,6 +6144,8 @@ exports.locals = {
61266144
\\"v-primary\\": \\"#BF4040\\",
61276145
\\"s-black\\": \\"black-selector\\",
61286146
\\"m-large\\": \\"(min-width: 960px)\\",
6147+
\\"v-string\\": \\"'my-content'\\",
6148+
\\"v-empty-string\\": \\"''\\",
61296149
\\"ghi\\": \\"_14uFt0lIVKKAlKTTT29IIQ\\",
61306150
\\"class\\": \\"_3XDgIzfUIQkaUInpEdo7fN\\",
61316151
\\"other\\": \\"_1wABXM_RabWHj--wsPrhvM\\",

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

+3-9
Large diffs are not rendered by default.

test/fixtures/modules/composes.css

+22
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,25 @@
8585
padding: 20px 20px;
8686
}
8787
}
88+
89+
@value v-string: 'my-content';
90+
91+
a {
92+
content: v-string;
93+
}
94+
95+
@supports (content: v-string) {
96+
a {
97+
content: v-string;
98+
}
99+
}
100+
101+
[class~=v-string] {
102+
color:green;
103+
}
104+
105+
@value v-empty-string: '';
106+
107+
a {
108+
content: v-empty-string;
109+
}

0 commit comments

Comments
 (0)