From fb5f645bc2732326d99945f992c43271d3bb8f0b Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 17 Apr 2025 07:36:07 +0800 Subject: [PATCH 1/3] fix: the ASCII whitespaces are preserved so can not be escaped https://infra.spec.whatwg.org/#ascii-whitespace --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 86866702..74e9625f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -260,7 +260,7 @@ function normalizePath(file) { } // eslint-disable-next-line no-control-regex -const filenameReservedRegex = /[<>:"/\\|?*]/g; +const filenameReservedRegex = /[<>:"/\\|?*\s]/g; // eslint-disable-next-line no-control-regex const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g; From 6bd44940d19e1015f6c06ef125029444d81fc4f5 Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 17 Apr 2025 07:47:04 +0800 Subject: [PATCH 2/3] chore: update snapshot --- .cspell.json | 3 +- .../__snapshots__/modules-option.test.js.snap | 46 +++++++++---------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.cspell.json b/.cspell.json index ca5a2cb5..caf22fd6 100644 --- a/.cspell.json +++ b/.cspell.json @@ -50,6 +50,7 @@ "**/fonts/**", "node_modules", "coverage", - "*.log" + "*.log", + "test/outputs" ] } diff --git a/test/__snapshots__/modules-option.test.js.snap b/test/__snapshots__/modules-option.test.js.snap index 37c78af1..34e0ffd3 100644 --- a/test/__snapshots__/modules-option.test.js.snap +++ b/test/__snapshots__/modules-option.test.js.snap @@ -392,17 +392,17 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`/* class="😀" */ /* Local */ /* class="😀" */ -.\\\\ { +.- { color: red; } /* class="😀 😓" */ -.\\\\ .\\\\ { +.-.- { color: red; } /* class="😀" > class="😓" */ -.\\\\ .\\\\ { +.- .- { color: red; } @@ -410,38 +410,38 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`/* class="😀" */ color: red; } -.\\\\ .\\\\ .\\\\ { +.- .- .- { color: red; } -div:not(.\\\\ ) { +div:not(.-) { color: red; } -.\\\\ .b { +.- .b { color: red; } -.b .\\\\ { +.b .- { color: red; } -.\\\\1F613 .\\\\ { +.\\\\1F613 .- { color: red; } -.\\\\1F613 .\\\\ { +.\\\\1F613 .- { color: red; } -.\\\\ > .\\\\ > .\\\\ { +.- > .- > .- { color: red; } \`, ""]); // Exports -export var a = \` \`; -export var b = \` \`; -export var c = \` \`; +export var a = \`-\`; +export var b = \`-\`; +export var c = \`-\`; export default ___CSS_LOADER_EXPORT___; " `; @@ -498,17 +498,17 @@ exports[`"modules" option issue #995 #2: result 1`] = ` /* Local */ /* class="😀" */ -.\\ { +.- { color: red; } /* class="😀 😓" */ -.\\ .\\ { +.-.- { color: red; } /* class="😀" > class="😓" */ -.\\ .\\ { +.- .- { color: red; } @@ -516,31 +516,31 @@ exports[`"modules" option issue #995 #2: result 1`] = ` color: red; } -.\\ .\\ .\\ { +.- .- .- { color: red; } -div:not(.\\ ) { +div:not(.-) { color: red; } -.\\ .b { +.- .b { color: red; } -.b .\\ { +.b .- { color: red; } -.\\1F613 .\\ { +.\\1F613 .- { color: red; } -.\\1F613 .\\ { +.\\1F613 .- { color: red; } -.\\ > .\\ > .\\ { +.- > .- > .- { color: red; } ", From cdb15b0742c026235383c0b47257582d699872d2 Mon Sep 17 00:00:00 2001 From: JounQin Date: Fri, 2 May 2025 13:35:59 +0800 Subject: [PATCH 3/3] refactor: add `reversedChartMapper` support --- src/utils.js | 20 +- .../__snapshots__/modules-option.test.js.snap | 446 ++++++++++-------- test/fixtures/modules/issue-1626/source.css | 7 + test/fixtures/modules/issue-1626/source.js | 5 + test/modules-option.test.js | 16 + 5 files changed, 289 insertions(+), 205 deletions(-) create mode 100644 test/fixtures/modules/issue-1626/source.css create mode 100644 test/fixtures/modules/issue-1626/source.js diff --git a/src/utils.js b/src/utils.js index 74e9625f..7b4e3f7d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -259,8 +259,10 @@ function normalizePath(file) { return path.sep === "\\" ? file.replace(/\\/g, "/") : file; } +const reversedChartMapper = {}; + // eslint-disable-next-line no-control-regex -const filenameReservedRegex = /[<>:"/\\|?*\s]/g; +const filenameReservedRegex = /([<>:"/\\|?*\s])/g; // eslint-disable-next-line no-control-regex const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g; @@ -270,7 +272,21 @@ function escapeLocalIdent(localident) { localident // For `[hash]` placeholder .replace(/^((-?[0-9])|--)/, "_$1") - .replace(filenameReservedRegex, "-") + .replace(filenameReservedRegex, (_, $1) => { + // normalize Windows path `\` as unix `/` for constancy + const char = $1 === "\\" ? "/" : $1; + + if (reversedChartMapper[char]) { + return reversedChartMapper[char]; + } + + const hex = char.charCodeAt(0).toString(16).toUpperCase(); + const escaped = `\\C${hex}`; + + reversedChartMapper[char] = escaped; + + return escaped; + }) .replace(reControlChars, "-") .replace(/\./g, "-"), ); diff --git a/test/__snapshots__/modules-option.test.js.snap b/test/__snapshots__/modules-option.test.js.snap index 34e0ffd3..a4e30d6e 100644 --- a/test/__snapshots__/modules-option.test.js.snap +++ b/test/__snapshots__/modules-option.test.js.snap @@ -154,7 +154,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`._7-foo-class { color: red; } -.\\\\--bar-class { +.\\\\\\\\C3E-bar-class { color: red; } @@ -173,7 +173,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`._7-foo-class { // Exports var _1 = \`_7-foo-class\`; export { _1 as "foo-class" }; -var _2 = \`--bar-class\`; +var _2 = \`\\\\C3E-bar-class\`; export { _2 as "bar-class" }; var _3 = \`--baz-class\`; export { _3 as "baz-class" }; @@ -194,7 +194,7 @@ exports[`"modules" option issue #966 - values in selectors aren't escaped proper color: red; } -.\\--bar-class { +.\\\\C3E-bar-class { color: red; } @@ -258,23 +258,23 @@ import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../src/runtime/no import ___CSS_LOADER_API_IMPORT___ from "../../../../src/runtime/api.js"; var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); // Module -___CSS_LOADER_EXPORT___.push([module.id, \`.modules-issue-967-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- { +___CSS_LOADER_EXPORT___.push([module.id, \`.modules\\\\\\\\C2Fissue-967\\\\\\\\C2Fpath-placeholder__foo__\\\\\\\\C2F-sep-\\\\\\\\C3F-sep-\\\\\\\\C3C-sep-\\\\\\\\C3E-sep-\\\\\\\\C2F\\\\\\\\C2F-sep-\\\\\\\\C3A-sep-\\\\\\\\C2A-sep-\\\\\\\\C7C-sep-\\\\\\\\C22-sep-\\\\\\\\C3A { color: red; } -.modules-issue-967-path-placeholder__foo\\\\/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- { +.modules\\\\\\\\C2Fissue-967\\\\\\\\C2Fpath-placeholder__foo\\\\/bar__\\\\\\\\C2F-sep-\\\\\\\\C3F-sep-\\\\\\\\C3C-sep-\\\\\\\\C3E-sep-\\\\\\\\C2F\\\\\\\\C2F-sep-\\\\\\\\C3A-sep-\\\\\\\\C2A-sep-\\\\\\\\C7C-sep-\\\\\\\\C22-sep-\\\\\\\\C3A { color: blue; } -.modules-issue-967-path-placeholder__\\\\[\\\\/\\\\?\\\\<\\\\>\\\\\\\\\\\\\\\\\\\\3A \\\\*\\\\|\\\\"\\\\3A \\\\]__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- { +.modules\\\\\\\\C2Fissue-967\\\\\\\\C2Fpath-placeholder__\\\\[\\\\/\\\\?\\\\<\\\\>\\\\\\\\\\\\\\\\\\\\3A \\\\*\\\\|\\\\"\\\\3A \\\\]__\\\\\\\\C2F-sep-\\\\\\\\C3F-sep-\\\\\\\\C3C-sep-\\\\\\\\C3E-sep-\\\\\\\\C2F\\\\\\\\C2F-sep-\\\\\\\\C3A-sep-\\\\\\\\C2A-sep-\\\\\\\\C7C-sep-\\\\\\\\C22-sep-\\\\\\\\C3A { color: yellow; } \`, ""]); // Exports -export var foo = \`modules-issue-967-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\`; -var _1 = \`modules-issue-967-path-placeholder__foo/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\`; +export var foo = \`modules\\\\C2Fissue-967\\\\C2Fpath-placeholder__foo__\\\\C2F-sep-\\\\C3F-sep-\\\\C3C-sep-\\\\C3E-sep-\\\\C2F\\\\C2F-sep-\\\\C3A-sep-\\\\C2A-sep-\\\\C7C-sep-\\\\C22-sep-\\\\C3A\`; +var _1 = \`modules\\\\C2Fissue-967\\\\C2Fpath-placeholder__foo/bar__\\\\C2F-sep-\\\\C3F-sep-\\\\C3C-sep-\\\\C3E-sep-\\\\C2F\\\\C2F-sep-\\\\C3A-sep-\\\\C2A-sep-\\\\C7C-sep-\\\\C22-sep-\\\\C3A\`; export { _1 as "foo/bar" }; -var _2 = \`modules-issue-967-path-placeholder__[/?<>\\\\\\\\:*|":]__--sep---sep---sep---sep----sep---sep---sep---sep---sep--\`; +var _2 = \`modules\\\\C2Fissue-967\\\\C2Fpath-placeholder__[/?<>\\\\\\\\:*|":]__\\\\C2F-sep-\\\\C3F-sep-\\\\C3C-sep-\\\\C3E-sep-\\\\C2F\\\\C2F-sep-\\\\C3A-sep-\\\\C2A-sep-\\\\C7C-sep-\\\\C22-sep-\\\\C3A\`; export { _2 as "[/?<>\\\\\\\\:*|\\":]" }; export default ___CSS_LOADER_EXPORT___; " @@ -284,15 +284,15 @@ exports[`"modules" option issue #967: result 1`] = ` [ [ "./modules/issue-967/path-placeholder.css", - ".modules-issue-967-path-placeholder__foo__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- { + ".modules\\\\C2Fissue-967\\\\C2Fpath-placeholder__foo__\\\\C2F-sep-\\\\C3F-sep-\\\\C3C-sep-\\\\C3E-sep-\\\\C2F\\\\C2F-sep-\\\\C3A-sep-\\\\C2A-sep-\\\\C7C-sep-\\\\C22-sep-\\\\C3A { color: red; } -.modules-issue-967-path-placeholder__foo\\/bar__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- { +.modules\\\\C2Fissue-967\\\\C2Fpath-placeholder__foo\\/bar__\\\\C2F-sep-\\\\C3F-sep-\\\\C3C-sep-\\\\C3E-sep-\\\\C2F\\\\C2F-sep-\\\\C3A-sep-\\\\C2A-sep-\\\\C7C-sep-\\\\C22-sep-\\\\C3A { color: blue; } -.modules-issue-967-path-placeholder__\\[\\/\\?\\<\\>\\\\\\\\\\3A \\*\\|\\"\\3A \\]__--sep---sep---sep---sep----sep---sep---sep---sep---sep-- { +.modules\\\\C2Fissue-967\\\\C2Fpath-placeholder__\\[\\/\\?\\<\\>\\\\\\\\\\3A \\*\\|\\"\\3A \\]__\\\\C2F-sep-\\\\C3F-sep-\\\\C3C-sep-\\\\C3E-sep-\\\\C2F\\\\C2F-sep-\\\\C3A-sep-\\\\C2A-sep-\\\\C7C-sep-\\\\C22-sep-\\\\C3A { color: yellow; } ", @@ -392,17 +392,17 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`/* class="😀" */ /* Local */ /* class="😀" */ -.- { +.\\\\\\\\C20 { color: red; } /* class="😀 😓" */ -.-.- { +.\\\\\\\\C20.\\\\\\\\C20 { color: red; } /* class="😀" > class="😓" */ -.- .- { +.\\\\\\\\C20 .\\\\\\\\C20 { color: red; } @@ -410,38 +410,38 @@ ___CSS_LOADER_EXPORT___.push([module.id, \`/* class="😀" */ color: red; } -.- .- .- { +.\\\\\\\\C20 .\\\\\\\\C20 .\\\\\\\\C20 { color: red; } -div:not(.-) { +div:not(.\\\\\\\\C20) { color: red; } -.- .b { +.\\\\\\\\C20 .b { color: red; } -.b .- { +.b .\\\\\\\\C20 { color: red; } -.\\\\1F613 .- { +.\\\\1F613 .\\\\\\\\C20 { color: red; } -.\\\\1F613 .- { +.\\\\1F613 .\\\\\\\\C20 { color: red; } -.- > .- > .- { +.\\\\\\\\C20 > .\\\\\\\\C20 > .\\\\\\\\C20 { color: red; } \`, ""]); // Exports -export var a = \`-\`; -export var b = \`-\`; -export var c = \`-\`; +export var a = \`\\\\C20\`; +export var b = \`\\\\C20\`; +export var c = \`\\\\C20\`; export default ___CSS_LOADER_EXPORT___; " `; @@ -498,17 +498,17 @@ exports[`"modules" option issue #995 #2: result 1`] = ` /* Local */ /* class="😀" */ -.- { +.\\\\C20 { color: red; } /* class="😀 😓" */ -.-.- { +.\\\\C20.\\\\C20 { color: red; } /* class="😀" > class="😓" */ -.- .- { +.\\\\C20 .\\\\C20 { color: red; } @@ -516,31 +516,31 @@ exports[`"modules" option issue #995 #2: result 1`] = ` color: red; } -.- .- .- { +.\\\\C20 .\\\\C20 .\\\\C20 { color: red; } -div:not(.-) { +div:not(.\\\\C20) { color: red; } -.- .b { +.\\\\C20 .b { color: red; } -.b .- { +.b .\\\\C20 { color: red; } -.\\1F613 .- { +.\\1F613 .\\\\C20 { color: red; } -.\\1F613 .- { +.\\1F613 .\\\\C20 { color: red; } -.- > .- > .- { +.\\\\C20 > .\\\\C20 > .\\\\C20 { color: red; } ", @@ -966,6 +966,46 @@ exports[`"modules" option issue #1191 - fallback to default getLocalIdent: resul exports[`"modules" option issue #1191 - fallback to default getLocalIdent: warnings 1`] = `[]`; +exports[`"modules" option issue #1626: errors 1`] = `[]`; + +exports[`"modules" option issue #1626: module 1`] = ` +"// Imports +import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../src/runtime/noSourceMaps.js"; +import ___CSS_LOADER_API_IMPORT___ from "../../../../src/runtime/api.js"; +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, \`a-b { + color: red; +} + +a\\\\C20b /* i.e. with spaces */ { + color: red; +} +\`, ""]); +// Exports +export default ___CSS_LOADER_EXPORT___; +" +`; + +exports[`"modules" option issue #1626: result 1`] = ` +[ + [ + "./modules/issue-1626/source.css", + "a-b { + color: red; +} + +a\\C20b /* i.e. with spaces */ { + color: red; +} +", + "", + ], +] +`; + +exports[`"modules" option issue #1626: warnings 1`] = `[]`; + exports[`"modules" option should avoid unnecessary "require": errors 1`] = `[]`; exports[`"modules" option should avoid unnecessary "require": module 1`] = ` @@ -8266,211 +8306,211 @@ import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../src/runtime/no import ___CSS_LOADER_API_IMPORT___ from "../../../../src/runtime/api.js"; var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); // Module -___CSS_LOADER_EXPORT___.push([module.id, \`.fixtures-modules-localIdentName-localIdentName__test { +___CSS_LOADER_EXPORT___.push([module.id, \`.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__test { background: red; } -.fixtures-modules-localIdentName-localIdentName___test { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName___test { background: blue; } -.fixtures-modules-localIdentName-localIdentName__className { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__className { background: red; } -#fixtures-modules-localIdentName-localIdentName__someId { +#fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__someId { background: green; } -.fixtures-modules-localIdentName-localIdentName__className .fixtures-modules-localIdentName-localIdentName__subClass { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__className .fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__subClass { color: green; } -#fixtures-modules-localIdentName-localIdentName__someId .fixtures-modules-localIdentName-localIdentName__subClass { +#fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__someId .fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__subClass { color: blue; } -.fixtures-modules-localIdentName-localIdentName__-a0-34a___f { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__-a0-34a___f { color: red; } -.fixtures-modules-localIdentName-localIdentName__m_x_\\\\@ { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__m_x_\\\\@ { margin-left: auto !important; margin-right: auto !important; } -.fixtures-modules-localIdentName-localIdentName__B\\\\&W\\\\? { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__B\\\\&W\\\\? { margin-left: auto !important; margin-right: auto !important; } /* matches elements with class=":\\\`(" */ -.fixtures-modules-localIdentName-localIdentName__\\\\3A \\\\\\\`\\\\( { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\3A \\\\\\\`\\\\( { color: aqua; } /* matches elements with class="1a2b3c" */ -.fixtures-modules-localIdentName-localIdentName__\\\\31 a2b3c { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\31 a2b3c { color: aliceblue; } /* matches the element with id="#fake-id" */ -#fixtures-modules-localIdentName-localIdentName__\\\\#fake-id { +#fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\#fake-id { color: antiquewhite; } /* matches the element with id="-a-b-c-" */ -#fixtures-modules-localIdentName-localIdentName__-a-b-c- { +#fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__-a-b-c- { color: azure; } /* matches the element with id="©" */ -#fixtures-modules-localIdentName-localIdentName__© { +#fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__© { color: black; } -.fixtures-modules-localIdentName-localIdentName__♥ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__© { background: lime; } -.fixtures-modules-localIdentName-localIdentName__😍 { background: lime; } -.fixtures-modules-localIdentName-localIdentName__“‘’” { background: lime; } -.fixtures-modules-localIdentName-localIdentName__☺☃ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__⌘⌥ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__𝄞♪♩♫♬ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__💩 { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\? { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\@ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\. { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\3A \\\\) { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\3A \\\\\\\`\\\\( { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\31 23 { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\31 a2b3c { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\<\\\\>\\\\<\\\\<\\\\<\\\\>\\\\>\\\\<\\\\> { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\[\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\>\\\\+\\\\<\\\\<\\\\<\\\\<\\\\-\\\\]\\\\>\\\\+\\\\+\\\\.\\\\>\\\\+\\\\.\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\.\\\\+\\\\+\\\\+\\\\.\\\\>\\\\+\\\\+\\\\.\\\\<\\\\<\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\>\\\\.\\\\+\\\\+\\\\+\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\>\\\\+\\\\.\\\\>\\\\. { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\# { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\#\\\\# { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\#\\\\.\\\\#\\\\.\\\\# { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\_ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\{\\\\} { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\#fake\\\\-id { background: lime; } -.fixtures-modules-localIdentName-localIdentName__foo\\\\.bar { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\3A hover { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\3A hover\\\\3A focus\\\\3A active { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\\\[attr\\\\=value\\\\] { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\/o\\\\/o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\\\\\o\\\\\\\\o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\*o\\\\*o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\!o\\\\!o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\'o\\\\'o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\~o\\\\~o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\+o\\\\+o { background: lime; } - -.fixtures-modules-localIdentName-localIdentName__foo\\\\/bar { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__♥ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__© { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__😍 { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__“‘’” { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__☺☃ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__⌘⌥ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__𝄞♪♩♫♬ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__💩 { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\? { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\@ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\. { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\3A \\\\) { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\3A \\\\\\\`\\\\( { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\31 23 { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\31 a2b3c { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\<\\\\>\\\\<\\\\<\\\\<\\\\>\\\\>\\\\<\\\\> { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\[\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\>\\\\+\\\\+\\\\+\\\\>\\\\+\\\\<\\\\<\\\\<\\\\<\\\\-\\\\]\\\\>\\\\+\\\\+\\\\.\\\\>\\\\+\\\\.\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\.\\\\+\\\\+\\\\+\\\\.\\\\>\\\\+\\\\+\\\\.\\\\<\\\\<\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\+\\\\.\\\\>\\\\.\\\\+\\\\+\\\\+\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\-\\\\.\\\\>\\\\+\\\\.\\\\>\\\\. { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\# { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\#\\\\# { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\#\\\\.\\\\#\\\\.\\\\# { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\_ { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\{\\\\} { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\#fake\\\\-id { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__foo\\\\.bar { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\3A hover { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\3A hover\\\\3A focus\\\\3A active { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__\\\\[attr\\\\=value\\\\] { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\/o\\\\/o { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\\\\\o\\\\\\\\o { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\*o\\\\*o { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\!o\\\\!o { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\'o\\\\'o { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\~o\\\\~o { background: lime; } +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__f\\\\+o\\\\+o { background: lime; } + +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__foo\\\\/bar { background: hotpink; } -.fixtures-modules-localIdentName-localIdentName__foo\\\\\\\\bar { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__foo\\\\\\\\bar { background: hotpink; } -.fixtures-modules-localIdentName-localIdentName__foo\\\\/bar\\\\/baz { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__foo\\\\/bar\\\\/baz { background: hotpink; } -.fixtures-modules-localIdentName-localIdentName__foo\\\\\\\\bar\\\\\\\\baz { +.fixtures\\\\\\\\C2Fmodules\\\\\\\\C2FlocalIdentName\\\\\\\\C2FlocalIdentName__foo\\\\\\\\bar\\\\\\\\baz { background: hotpink; } \`, ""]); // Exports -var _1 = \`fixtures-modules-localIdentName-localIdentName__123\`; +var _1 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__123\`; export { _1 as "123" }; -export var test = \`fixtures-modules-localIdentName-localIdentName__test\`; -export var _test = \`fixtures-modules-localIdentName-localIdentName___test\`; -export var className = \`fixtures-modules-localIdentName-localIdentName__className\`; -export var someId = \`fixtures-modules-localIdentName-localIdentName__someId\`; -export var subClass = \`fixtures-modules-localIdentName-localIdentName__subClass\`; -var _2 = \`fixtures-modules-localIdentName-localIdentName__-a0-34a___f\`; +export var test = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__test\`; +export var _test = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName___test\`; +export var className = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__className\`; +export var someId = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__someId\`; +export var subClass = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__subClass\`; +var _2 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__-a0-34a___f\`; export { _2 as "-a0-34a___f" }; -var _3 = \`fixtures-modules-localIdentName-localIdentName__m_x_@\`; +var _3 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__m_x_@\`; export { _3 as "m_x_@" }; -var _4 = \`fixtures-modules-localIdentName-localIdentName__B&W?\`; +var _4 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__B&W?\`; export { _4 as "B&W?" }; -var _5 = \`fixtures-modules-localIdentName-localIdentName__:\\\`(\`; +var _5 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__:\\\`(\`; export { _5 as ":\`(" }; -var _6 = \`fixtures-modules-localIdentName-localIdentName__1a2b3c\`; +var _6 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__1a2b3c\`; export { _6 as "1a2b3c" }; -var _7 = \`fixtures-modules-localIdentName-localIdentName__#fake-id\`; +var _7 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__#fake-id\`; export { _7 as "#fake-id" }; -var _8 = \`fixtures-modules-localIdentName-localIdentName__-a-b-c-\`; +var _8 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__-a-b-c-\`; export { _8 as "-a-b-c-" }; -var _9 = \`fixtures-modules-localIdentName-localIdentName__©\`; +var _9 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__©\`; export { _9 as "©" }; -var _a = \`fixtures-modules-localIdentName-localIdentName__♥\`; +var _a = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__♥\`; export { _a as "♥" }; -var _b = \`fixtures-modules-localIdentName-localIdentName__😍\`; +var _b = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__😍\`; export { _b as "😍" }; -var _c = \`fixtures-modules-localIdentName-localIdentName__“‘’”\`; +var _c = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__“‘’”\`; export { _c as "“‘’”" }; -var _d = \`fixtures-modules-localIdentName-localIdentName__☺☃\`; +var _d = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__☺☃\`; export { _d as "☺☃" }; -var _e = \`fixtures-modules-localIdentName-localIdentName__⌘⌥\`; +var _e = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__⌘⌥\`; export { _e as "⌘⌥" }; -var _f = \`fixtures-modules-localIdentName-localIdentName__𝄞♪♩♫♬\`; +var _f = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__𝄞♪♩♫♬\`; export { _f as "𝄞♪♩♫♬" }; -var _10 = \`fixtures-modules-localIdentName-localIdentName__💩\`; +var _10 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__💩\`; export { _10 as "💩" }; -var _11 = \`fixtures-modules-localIdentName-localIdentName__?\`; +var _11 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__?\`; export { _11 as "?" }; -var _12 = \`fixtures-modules-localIdentName-localIdentName__@\`; +var _12 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__@\`; export { _12 as "@" }; -var _13 = \`fixtures-modules-localIdentName-localIdentName__.\`; +var _13 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__.\`; export { _13 as "." }; -var _14 = \`fixtures-modules-localIdentName-localIdentName__:)\`; +var _14 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__:)\`; export { _14 as ":)" }; -var _15 = \`fixtures-modules-localIdentName-localIdentName__

\`; +var _15 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__

\`; export { _15 as "

" }; -var _16 = \`fixtures-modules-localIdentName-localIdentName__<><<<>><>\`; +var _16 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__<><<<>><>\`; export { _16 as "<><<<>><>" }; -var _17 = \`fixtures-modules-localIdentName-localIdentName__++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.\`; +var _17 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.\`; export { _17 as "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." }; -var _18 = \`fixtures-modules-localIdentName-localIdentName__#\`; +var _18 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__#\`; export { _18 as "#" }; -var _19 = \`fixtures-modules-localIdentName-localIdentName__##\`; +var _19 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__##\`; export { _19 as "##" }; -var _1a = \`fixtures-modules-localIdentName-localIdentName__#.#.#\`; +var _1a = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__#.#.#\`; export { _1a as "#.#.#" }; -export var _ = \`fixtures-modules-localIdentName-localIdentName___\`; -var _1b = \`fixtures-modules-localIdentName-localIdentName__{}\`; +export var _ = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName___\`; +var _1b = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__{}\`; export { _1b as "{}" }; -var _1c = \`fixtures-modules-localIdentName-localIdentName__foo.bar\`; +var _1c = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo.bar\`; export { _1c as "foo.bar" }; -var _1d = \`fixtures-modules-localIdentName-localIdentName__:hover\`; +var _1d = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__:hover\`; export { _1d as ":hover" }; -var _1e = \`fixtures-modules-localIdentName-localIdentName__:hover:focus:active\`; +var _1e = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__:hover:focus:active\`; export { _1e as ":hover:focus:active" }; -var _1f = \`fixtures-modules-localIdentName-localIdentName__[attr=value]\`; +var _1f = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__[attr=value]\`; export { _1f as "[attr=value]" }; -var _20 = \`fixtures-modules-localIdentName-localIdentName__f/o/o\`; +var _20 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f/o/o\`; export { _20 as "f/o/o" }; -var _21 = \`fixtures-modules-localIdentName-localIdentName__f\\\\o\\\\o\`; +var _21 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\\\o\\\\o\`; export { _21 as "f\\\\o\\\\o" }; -var _22 = \`fixtures-modules-localIdentName-localIdentName__f*o*o\`; +var _22 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f*o*o\`; export { _22 as "f*o*o" }; -var _23 = \`fixtures-modules-localIdentName-localIdentName__f!o!o\`; +var _23 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f!o!o\`; export { _23 as "f!o!o" }; -var _24 = \`fixtures-modules-localIdentName-localIdentName__f'o'o\`; +var _24 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f'o'o\`; export { _24 as "f'o'o" }; -var _25 = \`fixtures-modules-localIdentName-localIdentName__f~o~o\`; +var _25 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f~o~o\`; export { _25 as "f~o~o" }; -var _26 = \`fixtures-modules-localIdentName-localIdentName__f+o+o\`; +var _26 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f+o+o\`; export { _26 as "f+o+o" }; -var _27 = \`fixtures-modules-localIdentName-localIdentName__foo/bar\`; +var _27 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo/bar\`; export { _27 as "foo/bar" }; -var _28 = \`fixtures-modules-localIdentName-localIdentName__foo\\\\bar\`; +var _28 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\\\bar\`; export { _28 as "foo\\\\bar" }; -var _29 = \`fixtures-modules-localIdentName-localIdentName__foo/bar/baz\`; +var _29 = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo/bar/baz\`; export { _29 as "foo/bar/baz" }; -var _2a = \`fixtures-modules-localIdentName-localIdentName__foo\\\\bar\\\\baz\`; +var _2a = \`fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\\\bar\\\\baz\`; export { _2a as "foo\\\\bar\\\\baz" }; export default ___CSS_LOADER_EXPORT___; " @@ -8480,118 +8520,118 @@ exports[`"modules" option should work and respect the "path" placeholder: result [ [ "./modules/localIdentName/localIdentName.css", - ".fixtures-modules-localIdentName-localIdentName__test { + ".fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__test { background: red; } -.fixtures-modules-localIdentName-localIdentName___test { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName___test { background: blue; } -.fixtures-modules-localIdentName-localIdentName__className { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__className { background: red; } -#fixtures-modules-localIdentName-localIdentName__someId { +#fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__someId { background: green; } -.fixtures-modules-localIdentName-localIdentName__className .fixtures-modules-localIdentName-localIdentName__subClass { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__className .fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__subClass { color: green; } -#fixtures-modules-localIdentName-localIdentName__someId .fixtures-modules-localIdentName-localIdentName__subClass { +#fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__someId .fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__subClass { color: blue; } -.fixtures-modules-localIdentName-localIdentName__-a0-34a___f { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__-a0-34a___f { color: red; } -.fixtures-modules-localIdentName-localIdentName__m_x_\\@ { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__m_x_\\@ { margin-left: auto !important; margin-right: auto !important; } -.fixtures-modules-localIdentName-localIdentName__B\\&W\\? { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__B\\&W\\? { margin-left: auto !important; margin-right: auto !important; } /* matches elements with class=":\`(" */ -.fixtures-modules-localIdentName-localIdentName__\\3A \\\`\\( { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\3A \\\`\\( { color: aqua; } /* matches elements with class="1a2b3c" */ -.fixtures-modules-localIdentName-localIdentName__\\31 a2b3c { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\31 a2b3c { color: aliceblue; } /* matches the element with id="#fake-id" */ -#fixtures-modules-localIdentName-localIdentName__\\#fake-id { +#fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\#fake-id { color: antiquewhite; } /* matches the element with id="-a-b-c-" */ -#fixtures-modules-localIdentName-localIdentName__-a-b-c- { +#fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__-a-b-c- { color: azure; } /* matches the element with id="©" */ -#fixtures-modules-localIdentName-localIdentName__© { +#fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__© { color: black; } -.fixtures-modules-localIdentName-localIdentName__♥ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__© { background: lime; } -.fixtures-modules-localIdentName-localIdentName__😍 { background: lime; } -.fixtures-modules-localIdentName-localIdentName__“‘’” { background: lime; } -.fixtures-modules-localIdentName-localIdentName__☺☃ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__⌘⌥ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__𝄞♪♩♫♬ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__💩 { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\? { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\@ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\. { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\3A \\) { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\3A \\\`\\( { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\31 23 { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\31 a2b3c { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\<\\>\\<\\<\\<\\>\\>\\<\\> { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\# { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\#\\# { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\#\\.\\#\\.\\# { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\_ { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\{\\} { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\#fake\\-id { background: lime; } -.fixtures-modules-localIdentName-localIdentName__foo\\.bar { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\3A hover { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\3A hover\\3A focus\\3A active { background: lime; } -.fixtures-modules-localIdentName-localIdentName__\\[attr\\=value\\] { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\/o\\/o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\\\o\\\\o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\*o\\*o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\!o\\!o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\'o\\'o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\~o\\~o { background: lime; } -.fixtures-modules-localIdentName-localIdentName__f\\+o\\+o { background: lime; } - -.fixtures-modules-localIdentName-localIdentName__foo\\/bar { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__♥ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__© { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__😍 { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__“‘’” { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__☺☃ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__⌘⌥ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__𝄞♪♩♫♬ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__💩 { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\? { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\@ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\. { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\3A \\) { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\3A \\\`\\( { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\31 23 { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\31 a2b3c { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\<\\>\\<\\<\\<\\>\\>\\<\\> { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\[\\>\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\>\\+\\+\\+\\>\\+\\<\\<\\<\\<\\-\\]\\>\\+\\+\\.\\>\\+\\.\\+\\+\\+\\+\\+\\+\\+\\.\\.\\+\\+\\+\\.\\>\\+\\+\\.\\<\\<\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\+\\.\\>\\.\\+\\+\\+\\.\\-\\-\\-\\-\\-\\-\\.\\-\\-\\-\\-\\-\\-\\-\\-\\.\\>\\+\\.\\>\\. { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\# { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\#\\# { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\#\\.\\#\\.\\# { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\_ { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\{\\} { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\#fake\\-id { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\.bar { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\3A hover { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\3A hover\\3A focus\\3A active { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__\\[attr\\=value\\] { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\/o\\/o { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\\\o\\\\o { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\*o\\*o { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\!o\\!o { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\'o\\'o { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\~o\\~o { background: lime; } +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__f\\+o\\+o { background: lime; } + +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\/bar { background: hotpink; } -.fixtures-modules-localIdentName-localIdentName__foo\\\\bar { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\\\bar { background: hotpink; } -.fixtures-modules-localIdentName-localIdentName__foo\\/bar\\/baz { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\/bar\\/baz { background: hotpink; } -.fixtures-modules-localIdentName-localIdentName__foo\\\\bar\\\\baz { +.fixtures\\\\C2Fmodules\\\\C2FlocalIdentName\\\\C2FlocalIdentName__foo\\\\bar\\\\baz { background: hotpink; } ", @@ -10033,12 +10073,12 @@ import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../src/runtime/no import ___CSS_LOADER_API_IMPORT___ from "../../../../src/runtime/api.js"; var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); // Module -___CSS_LOADER_EXPORT___.push([module.id, \`.modules-mode-style-modules__class { +___CSS_LOADER_EXPORT___.push([module.id, \`.modules\\\\\\\\C2Fmode\\\\\\\\C2Fstyle-modules__class { color: red; } \`, ""]); // Exports -var _1 = \`modules-mode-style-modules__class\`; +var _1 = \`modules\\\\C2Fmode\\\\C2Fstyle-modules__class\`; export { _1 as "class" }; export default ___CSS_LOADER_EXPORT___; " @@ -10050,22 +10090,22 @@ import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../src/runtime/no import ___CSS_LOADER_API_IMPORT___ from "../../../../src/runtime/api.js"; var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); // Module -___CSS_LOADER_EXPORT___.push([module.id, \`.modules-mode-no-modules__class { +___CSS_LOADER_EXPORT___.push([module.id, \`.modules\\\\\\\\C2Fmode\\\\\\\\C2Fno-modules__class { color: red; } \`, ""]); // Exports -var _1 = \`modules-mode-no-modules__class\`; +var _1 = \`modules\\\\C2Fmode\\\\C2Fno-modules__class\`; export { _1 as "class" }; export default ___CSS_LOADER_EXPORT___; " `; exports[`"modules" option should work when the "auto" is not specified, but specified other modules options: result 1`] = ` -".modules-mode-style-modules__class { +".modules\\\\C2Fmode\\\\C2Fstyle-modules__class { color: red; } -.modules-mode-no-modules__class { +.modules\\\\C2Fmode\\\\C2Fno-modules__class { color: red; } " @@ -10127,12 +10167,12 @@ import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../src/runtime/no import ___CSS_LOADER_API_IMPORT___ from "../../../../src/runtime/api.js"; var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); // Module -___CSS_LOADER_EXPORT___.push([module.id, \`.modules-mode-style-modules__class { +___CSS_LOADER_EXPORT___.push([module.id, \`.modules\\\\\\\\C2Fmode\\\\\\\\C2Fstyle-modules__class { color: red; } \`, ""]); // Exports -var _1 = \`modules-mode-style-modules__class\`; +var _1 = \`modules\\\\C2Fmode\\\\C2Fstyle-modules__class\`; export { _1 as "class" }; export default ___CSS_LOADER_EXPORT___; " @@ -10154,7 +10194,7 @@ export default ___CSS_LOADER_EXPORT___; `; exports[`"modules" option should work when the "auto" option is "true" with other options: result 1`] = ` -".modules-mode-style-modules__class { +".modules\\\\C2Fmode\\\\C2Fstyle-modules__class { color: red; } .class { @@ -12208,11 +12248,11 @@ import ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from "../../../../../../src/runt import ___CSS_LOADER_API_IMPORT___ from "../../../../../../src/runtime/api.js"; var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___); // Module -___CSS_LOADER_EXPORT___.push([module.id, \`.modules-issue-1223-\\\\@foo-bar--myClass { +___CSS_LOADER_EXPORT___.push([module.id, \`.modules\\\\\\\\C2Fissue-1223\\\\\\\\C2F\\\\@foo\\\\\\\\C2Fbar\\\\\\\\C2F-myClass { color: red; }\`, ""]); // Exports -export var myClass = \`modules-issue-1223-@foo-bar--myClass\`; +export var myClass = \`modules\\\\C2Fissue-1223\\\\C2F@foo\\\\C2Fbar\\\\C2F-myClass\`; export default ___CSS_LOADER_EXPORT___; " `; @@ -12221,7 +12261,7 @@ exports[`"modules" option should work with \`@\` character in scoped packages: r [ [ "./modules/issue-1223/@foo/bar/index.module.css", - ".modules-issue-1223-\\@foo-bar--myClass { + ".modules\\\\C2Fissue-1223\\\\C2F\\@foo\\\\C2Fbar\\\\C2F-myClass { color: red; }", "", diff --git a/test/fixtures/modules/issue-1626/source.css b/test/fixtures/modules/issue-1626/source.css new file mode 100644 index 00000000..209691af --- /dev/null +++ b/test/fixtures/modules/issue-1626/source.css @@ -0,0 +1,7 @@ +a-b { + color: red; +} + +a\C20b /* i.e. with spaces */ { + color: red; +} diff --git a/test/fixtures/modules/issue-1626/source.js b/test/fixtures/modules/issue-1626/source.js new file mode 100644 index 00000000..9b8393fb --- /dev/null +++ b/test/fixtures/modules/issue-1626/source.js @@ -0,0 +1,5 @@ +import * as css from './source.css'; + +__export__ = css.default; + +export default css; diff --git a/test/modules-option.test.js b/test/modules-option.test.js index c2d190c9..8fc29357 100644 --- a/test/modules-option.test.js +++ b/test/modules-option.test.js @@ -2692,4 +2692,20 @@ describe('"modules" option', () => { expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); }); + + it("issue #1626", async () => { + const compiler = getCompiler("./modules/issue-1626/source.js", { + modules: true, + }); + const stats = await compile(compiler); + + expect( + getModuleSource("./modules/issue-1626/source.css", stats), + ).toMatchSnapshot("module"); + expect(getExecutedCode("main.bundle.js", compiler, stats)).toMatchSnapshot( + "result", + ); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + }); });