From 9e896d2b0b68d046f6697d947e3bc4b9b1127275 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Wed, 7 Jun 2023 20:53:54 +0530 Subject: [PATCH 01/29] feat: style field resolution --- lib/config/defaults.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 63245a0516c..39dea682d1b 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -704,9 +704,16 @@ const applyModuleDefaults = ( }); } if (css) { + const styleResolutionDefaults = { + conditionNames: ["style"], + mainFields: ["css", "style", "main", "..."], + mainFiles: ["index", "..."], + extensions: [".css", "..."] + }; const cssRule = { type: CSS_MODULE_TYPE, resolve: { + ...styleResolutionDefaults, fullySpecified: true, preferRelative: true } @@ -714,6 +721,7 @@ const applyModuleDefaults = ( const cssModulesRule = { type: "css/module", resolve: { + ...styleResolutionDefaults, fullySpecified: true } }; From 21b9bb111ee11062a83c404c0f3ccc0f46c66fc2 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Wed, 7 Jun 2023 20:54:20 +0530 Subject: [PATCH 02/29] test: add testcases for style field resolution --- .../node_modules/style-library-css-field/package.json | 3 +++ .../css-import/node_modules/style-library-css-field/styles.css | 3 +++ .../css/css-import/node_modules/style-library/package.json | 3 +++ .../css/css-import/node_modules/style-library/styles.css | 3 +++ test/configCases/css/css-import/style-import.css | 2 ++ test/configCases/css/css-import/style.css | 1 + 6 files changed, 15 insertions(+) create mode 100644 test/configCases/css/css-import/node_modules/style-library-css-field/package.json create mode 100644 test/configCases/css/css-import/node_modules/style-library-css-field/styles.css create mode 100644 test/configCases/css/css-import/node_modules/style-library/package.json create mode 100644 test/configCases/css/css-import/node_modules/style-library/styles.css create mode 100644 test/configCases/css/css-import/style-import.css diff --git a/test/configCases/css/css-import/node_modules/style-library-css-field/package.json b/test/configCases/css/css-import/node_modules/style-library-css-field/package.json new file mode 100644 index 00000000000..73eec2960ad --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-library-css-field/package.json @@ -0,0 +1,3 @@ +{ + "css": "./styles.css" +} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/style-library-css-field/styles.css b/test/configCases/css/css-import/node_modules/style-library-css-field/styles.css new file mode 100644 index 00000000000..c69953a38cb --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-library-css-field/styles.css @@ -0,0 +1,3 @@ +p { + color: aliceblue; +} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/style-library/package.json b/test/configCases/css/css-import/node_modules/style-library/package.json new file mode 100644 index 00000000000..fb4e6366022 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-library/package.json @@ -0,0 +1,3 @@ +{ + "style": "./styles.css" +} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/style-library/styles.css b/test/configCases/css/css-import/node_modules/style-library/styles.css new file mode 100644 index 00000000000..cf378a3afca --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-library/styles.css @@ -0,0 +1,3 @@ +p { + color: steelblue; +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css new file mode 100644 index 00000000000..c60d76b0fd5 --- /dev/null +++ b/test/configCases/css/css-import/style-import.css @@ -0,0 +1,2 @@ +@import "style-library"; +@import "style-library-css-field"; \ No newline at end of file diff --git a/test/configCases/css/css-import/style.css b/test/configCases/css/css-import/style.css index bc221f213e5..99ede3dad05 100644 --- a/test/configCases/css/css-import/style.css +++ b/test/configCases/css/css-import/style.css @@ -1,3 +1,4 @@ +@import "./style-import.css"; @import "print.css?foo=1"; @import url("print.css?foo=2"); @import "print.css?foo=3" layer(default); From 15e1e2a18b31f9781a467a5a6c995ed096a8bb2b Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Wed, 7 Jun 2023 21:02:28 +0530 Subject: [PATCH 03/29] test: update snapshots --- test/__snapshots__/ConfigTestCases.basictest.js.snap | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 9aaf0242c8a..7741baedcaa 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -18,6 +18,14 @@ body { externally-imported2: true; } +p { + color: steelblue; +} + +p { + color: aliceblue; +} + body { background: black; } @@ -1173,7 +1181,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/style-library-css-field\\\\/styles\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; From dcd2d5191b67d874427f479b69ec026328a93d7c Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Wed, 7 Jun 2023 21:52:11 +0530 Subject: [PATCH 04/29] test: update snapshots --- test/Defaults.unittest.js | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 8d0c125c196..49f897eb8c0 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -2240,14 +2240,48 @@ describe("snapshots", () => { + "oneOf": Array [ + Object { + "resolve": Object { + + "conditionNames": Array [ + + "style", + + ], + + "extensions": Array [ + + ".css", + + "...", + + ], + "fullySpecified": true, + + "mainFields": Array [ + + "css", + + "style", + + "main", + + "...", + + ], + + "mainFiles": Array [ + + "index", + + "...", + + ], + }, + "test": /\\.module\\.css$/i, + "type": "css/module", + }, + Object { + "resolve": Object { + + "conditionNames": Array [ + + "style", + + ], + + "extensions": Array [ + + ".css", + + "...", + + ], + "fullySpecified": true, + + "mainFields": Array [ + + "css", + + "style", + + "main", + + "...", + + ], + + "mainFiles": Array [ + + "index", + + "...", + + ], + "preferRelative": true, + }, + "type": "css", @@ -2258,13 +2292,47 @@ describe("snapshots", () => { + Object { + "mimetype": "text/css+module", + "resolve": Object { + + "conditionNames": Array [ + + "style", + + ], + + "extensions": Array [ + + ".css", + + "...", + + ], + "fullySpecified": true, + + "mainFields": Array [ + + "css", + + "style", + + "main", + + "...", + + ], + + "mainFiles": Array [ + + "index", + + "...", + + ], + }, + "type": "css/module", @@ ... @@ + "mimetype": "text/css", + "resolve": Object { + + "conditionNames": Array [ + + "style", + + ], + + "extensions": Array [ + + ".css", + + "...", + + ], + "fullySpecified": true, + + "mainFields": Array [ + + "css", + + "style", + + "main", + + "...", + + ], + + "mainFiles": Array [ + + "index", + + "...", + + ], + "preferRelative": true, + }, + "type": "css", From 4db1194c3bfb1e8c4ce45b8adfb9810f434ef48d Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Wed, 7 Jun 2023 21:53:19 +0530 Subject: [PATCH 05/29] fix: dont resolve css field --- lib/config/defaults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 39dea682d1b..bba7068109e 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -706,7 +706,7 @@ const applyModuleDefaults = ( if (css) { const styleResolutionDefaults = { conditionNames: ["style"], - mainFields: ["css", "style", "main", "..."], + mainFields: ["style", "main", "..."], mainFiles: ["index", "..."], extensions: [".css", "..."] }; From ba6ba46d07803b8aa6f49bc98ab2ed4379631114 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Wed, 7 Jun 2023 21:57:07 +0530 Subject: [PATCH 06/29] test: update tests --- test/Defaults.unittest.js | 4 ---- test/__snapshots__/ConfigTestCases.basictest.js.snap | 5 +---- .../node_modules/style-library-css-field/package.json | 3 --- .../node_modules/style-library-css-field/styles.css | 3 --- test/configCases/css/css-import/style-import.css | 3 +-- 5 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 test/configCases/css/css-import/node_modules/style-library-css-field/package.json delete mode 100644 test/configCases/css/css-import/node_modules/style-library-css-field/styles.css diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 49f897eb8c0..72277686ead 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -2249,7 +2249,6 @@ describe("snapshots", () => { + ], + "fullySpecified": true, + "mainFields": Array [ - + "css", + "style", + "main", + "...", @@ -2273,7 +2272,6 @@ describe("snapshots", () => { + ], + "fullySpecified": true, + "mainFields": Array [ - + "css", + "style", + "main", + "...", @@ -2301,7 +2299,6 @@ describe("snapshots", () => { + ], + "fullySpecified": true, + "mainFields": Array [ - + "css", + "style", + "main", + "...", @@ -2324,7 +2321,6 @@ describe("snapshots", () => { + ], + "fullySpecified": true, + "mainFields": Array [ - + "css", + "style", + "main", + "...", diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 7741baedcaa..04771d948bd 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -22,9 +22,6 @@ p { color: steelblue; } -p { - color: aliceblue; -} body { background: black; @@ -1181,7 +1178,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/style-library-css-field\\\\/styles\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/configCases/css/css-import/node_modules/style-library-css-field/package.json b/test/configCases/css/css-import/node_modules/style-library-css-field/package.json deleted file mode 100644 index 73eec2960ad..00000000000 --- a/test/configCases/css/css-import/node_modules/style-library-css-field/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "css": "./styles.css" -} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/style-library-css-field/styles.css b/test/configCases/css/css-import/node_modules/style-library-css-field/styles.css deleted file mode 100644 index c69953a38cb..00000000000 --- a/test/configCases/css/css-import/node_modules/style-library-css-field/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -p { - color: aliceblue; -} \ No newline at end of file diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index c60d76b0fd5..8d1c4c770e0 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -1,2 +1 @@ -@import "style-library"; -@import "style-library-css-field"; \ No newline at end of file +@import "style-library"; \ No newline at end of file From 8234b149359af7770db7054b8e94ad535704f8c7 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Thu, 8 Jun 2023 09:39:15 +0530 Subject: [PATCH 07/29] fix: move resolution to by dependency --- lib/config/defaults.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index bba7068109e..39bcb647f48 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -704,16 +704,9 @@ const applyModuleDefaults = ( }); } if (css) { - const styleResolutionDefaults = { - conditionNames: ["style"], - mainFields: ["style", "main", "..."], - mainFiles: ["index", "..."], - extensions: [".css", "..."] - }; const cssRule = { type: CSS_MODULE_TYPE, resolve: { - ...styleResolutionDefaults, fullySpecified: true, preferRelative: true } @@ -721,7 +714,6 @@ const applyModuleDefaults = ( const cssModulesRule = { type: "css/module", resolve: { - ...styleResolutionDefaults, fullySpecified: true } }; @@ -1443,6 +1435,14 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { extensions: [...jsExtensions] }); + /** @type {function(): ResolveOptions} */ + const styleDeps = () => ({ + conditionNames: ["style"], + mainFields: ["style", "main", "..."], + mainFiles: ["index", "..."], + extensions: [".css", "..."] + }); + /** @type {ResolveOptions} */ const resolveOptions = { cache, @@ -1472,7 +1472,8 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { // for backward-compat: Custom Dependency unknown: cjsDeps(), // for backward-compat: getResolve without dependencyType - undefined: cjsDeps() + undefined: cjsDeps(), + "css-import": styleDeps() } }; From 47fa1dd5981acbe32726e331b242d80fea54fedc Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Thu, 8 Jun 2023 09:39:32 +0530 Subject: [PATCH 08/29] test: update snapshots --- test/__snapshots__/ConfigCacheTestCases.longtest.js.snap | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index a0b507cddbe..bd348813e28 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -18,6 +18,11 @@ body { externally-imported2: true; } +p { + color: steelblue; +} + + body { background: black; } @@ -1173,7 +1178,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; From 9f27e7563e7d5ca32ae3c23f609ea07d93d46fbb Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Thu, 8 Jun 2023 09:40:57 +0530 Subject: [PATCH 09/29] test: update snapshots --- test/Defaults.unittest.js | 82 +++++++++------------------------------ 1 file changed, 18 insertions(+), 64 deletions(-) diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 72277686ead..4706df62af8 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -430,6 +430,24 @@ describe("snapshots", () => { "...", ], }, + "css-import": Object { + "conditionNames": Array [ + "style", + ], + "extensions": Array [ + ".css", + "...", + ], + "mainFields": Array [ + "style", + "main", + "...", + ], + "mainFiles": Array [ + "index", + "...", + ], + }, "esm": Object { "aliasFields": Array [ "browser", @@ -2240,46 +2258,14 @@ describe("snapshots", () => { + "oneOf": Array [ + Object { + "resolve": Object { - + "conditionNames": Array [ - + "style", - + ], - + "extensions": Array [ - + ".css", - + "...", - + ], + "fullySpecified": true, - + "mainFields": Array [ - + "style", - + "main", - + "...", - + ], - + "mainFiles": Array [ - + "index", - + "...", - + ], + }, + "test": /\\.module\\.css$/i, + "type": "css/module", + }, + Object { + "resolve": Object { - + "conditionNames": Array [ - + "style", - + ], - + "extensions": Array [ - + ".css", - + "...", - + ], + "fullySpecified": true, - + "mainFields": Array [ - + "style", - + "main", - + "...", - + ], - + "mainFiles": Array [ - + "index", - + "...", - + ], + "preferRelative": true, + }, + "type": "css", @@ -2290,45 +2276,13 @@ describe("snapshots", () => { + Object { + "mimetype": "text/css+module", + "resolve": Object { - + "conditionNames": Array [ - + "style", - + ], - + "extensions": Array [ - + ".css", - + "...", - + ], + "fullySpecified": true, - + "mainFields": Array [ - + "style", - + "main", - + "...", - + ], - + "mainFiles": Array [ - + "index", - + "...", - + ], + }, + "type": "css/module", @@ ... @@ + "mimetype": "text/css", + "resolve": Object { - + "conditionNames": Array [ - + "style", - + ], - + "extensions": Array [ - + ".css", - + "...", - + ], + "fullySpecified": true, - + "mainFields": Array [ - + "style", - + "main", - + "...", - + ], - + "mainFiles": Array [ - + "index", - + "...", - + ], + "preferRelative": true, + }, + "type": "css", From d61b29b0901d40447dce6174b7ca608aeb18d14c Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Thu, 8 Jun 2023 16:36:17 +0530 Subject: [PATCH 10/29] test: add more tests --- .../ConfigCacheTestCases.longtest.js.snap | 10 +++++++++- .../ConfigTestCases.basictest.js.snap | 10 +++++++++- .../node_modules/main-field/package.json | 3 +++ .../node_modules/main-field/styles.css | 3 +++ .../package-with-exports/index.cjs | 0 .../package-with-exports/index.js | 0 .../package-with-exports/package.json | 19 +++++++++++++++++++ .../package-with-exports/style.css | 3 +++ .../css/css-import/style-import.css | 4 +++- 9 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 test/configCases/css/css-import/node_modules/main-field/package.json create mode 100644 test/configCases/css/css-import/node_modules/main-field/styles.css create mode 100644 test/configCases/css/css-import/node_modules/package-with-exports/index.cjs create mode 100644 test/configCases/css/css-import/node_modules/package-with-exports/index.js create mode 100644 test/configCases/css/css-import/node_modules/package-with-exports/package.json create mode 100644 test/configCases/css/css-import/node_modules/package-with-exports/style.css diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index bd348813e28..0a103268875 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -22,6 +22,14 @@ p { color: steelblue; } +p { + color: antiquewhite; +} + +.load-me { + color: red; +} + body { background: black; @@ -1178,7 +1186,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 04771d948bd..2da01c59e80 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -22,6 +22,14 @@ p { color: steelblue; } +p { + color: antiquewhite; +} + +.load-me { + color: red; +} + body { background: black; @@ -1178,7 +1186,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/configCases/css/css-import/node_modules/main-field/package.json b/test/configCases/css/css-import/node_modules/main-field/package.json new file mode 100644 index 00000000000..51c982d306f --- /dev/null +++ b/test/configCases/css/css-import/node_modules/main-field/package.json @@ -0,0 +1,3 @@ +{ + "main": "styles.css" +} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/main-field/styles.css b/test/configCases/css/css-import/node_modules/main-field/styles.css new file mode 100644 index 00000000000..7ccc4470fc5 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/main-field/styles.css @@ -0,0 +1,3 @@ +p { + color: antiquewhite; +} diff --git a/test/configCases/css/css-import/node_modules/package-with-exports/index.cjs b/test/configCases/css/css-import/node_modules/package-with-exports/index.cjs new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/css/css-import/node_modules/package-with-exports/index.js b/test/configCases/css/css-import/node_modules/package-with-exports/index.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/css/css-import/node_modules/package-with-exports/package.json b/test/configCases/css/css-import/node_modules/package-with-exports/package.json new file mode 100644 index 00000000000..9b5e2b602a8 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/package-with-exports/package.json @@ -0,0 +1,19 @@ +{ + "name": "package-with-exports", + "version": "1.0.0", + "description": "test", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT", + "type": "module", + "module": "index.js", + "main": "index.cjs", + "style": "style.css", + "exports": { + "style": "./style.css", + "require": "./index.cjs", + "import": "./index.js" + } +} diff --git a/test/configCases/css/css-import/node_modules/package-with-exports/style.css b/test/configCases/css/css-import/node_modules/package-with-exports/style.css new file mode 100644 index 00000000000..38ef857cb7d --- /dev/null +++ b/test/configCases/css/css-import/node_modules/package-with-exports/style.css @@ -0,0 +1,3 @@ +.load-me { + color: red; +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 8d1c4c770e0..9b0527dd8dd 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -1 +1,3 @@ -@import "style-library"; \ No newline at end of file +@import "style-library"; +@import "main-field"; +@import "package-with-exports"; \ No newline at end of file From dcfa51869b9b8dcd43c6415ff7d4abdf65498a90 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Mon, 12 Jun 2023 19:27:38 +0530 Subject: [PATCH 11/29] fix: resolver options --- lib/config/defaults.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 39bcb647f48..2e067d52056 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -1438,9 +1438,9 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { /** @type {function(): ResolveOptions} */ const styleDeps = () => ({ conditionNames: ["style"], - mainFields: ["style", "main", "..."], - mainFiles: ["index", "..."], - extensions: [".css", "..."] + mainFields: ["style", "..."], + mainFiles: [], + extensions: [".css"] }); /** @type {ResolveOptions} */ From 26694374ade6f11f255f3e6e58bf21b099a7ac48 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Mon, 12 Jun 2023 19:28:12 +0530 Subject: [PATCH 12/29] test: update snapshots --- test/Defaults.unittest.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 4706df62af8..592163d1aa4 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -436,17 +436,12 @@ describe("snapshots", () => { ], "extensions": Array [ ".css", - "...", ], "mainFields": Array [ "style", - "main", - "...", - ], - "mainFiles": Array [ - "index", "...", ], + "mainFiles": Array [], }, "esm": Object { "aliasFields": Array [ From 98d1f9c5a25d2e9dcc1c4c252c8dd97f5c1a127e Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Mon, 12 Jun 2023 19:49:38 +0530 Subject: [PATCH 13/29] test: add more test cases --- .../css/css-import/node_modules/js-import/index.js | 3 +++ .../css/css-import/node_modules/js-import/package.json | 3 +++ test/configCases/css/css-import/some-file.js | 0 test/configCases/css/css-import/style-import.css | 4 +++- 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/configCases/css/css-import/node_modules/js-import/index.js create mode 100644 test/configCases/css/css-import/node_modules/js-import/package.json create mode 100644 test/configCases/css/css-import/some-file.js diff --git a/test/configCases/css/css-import/node_modules/js-import/index.js b/test/configCases/css/css-import/node_modules/js-import/index.js new file mode 100644 index 00000000000..0b2a8ed66e2 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/js-import/index.js @@ -0,0 +1,3 @@ +function someCode() { + console.log('some code'); +} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/js-import/package.json b/test/configCases/css/css-import/node_modules/js-import/package.json new file mode 100644 index 00000000000..1f4546b29f3 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/js-import/package.json @@ -0,0 +1,3 @@ +{ + "main": "index.js" +} \ No newline at end of file diff --git a/test/configCases/css/css-import/some-file.js b/test/configCases/css/css-import/some-file.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 9b0527dd8dd..e868d7060c9 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -1,3 +1,5 @@ @import "style-library"; @import "main-field"; -@import "package-with-exports"; \ No newline at end of file +@import "package-with-exports"; +@import url("some-file.js"); +@import "js-import"; \ No newline at end of file From 426f90c0506dab0873ad572bd95b4ae0f9004278 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Mon, 12 Jun 2023 19:52:23 +0530 Subject: [PATCH 14/29] test: add contents to js file --- test/configCases/css/css-import/some-file.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/configCases/css/css-import/some-file.js b/test/configCases/css/css-import/some-file.js index e69de29bb2d..ba55c81f9c5 100644 --- a/test/configCases/css/css-import/some-file.js +++ b/test/configCases/css/css-import/some-file.js @@ -0,0 +1,3 @@ +function doNotImportCss() { + return 'doNotImportCss'; +} \ No newline at end of file From f0678c1de450db3a39a94b85c2eaef7e5f54fffa Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Mon, 12 Jun 2023 20:52:00 +0530 Subject: [PATCH 15/29] test: add failure cases --- test/configCases/css/css-import/directory/index.css | 3 +++ test/configCases/css/css-import/errors.js | 4 ++++ .../css/css-import/node_modules/non-exported-css/index.css | 3 +++ .../css/css-import/node_modules/non-exported-css/package.json | 3 +++ test/configCases/css/css-import/style-import.css | 4 +++- 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/configCases/css/css-import/directory/index.css create mode 100644 test/configCases/css/css-import/errors.js create mode 100644 test/configCases/css/css-import/node_modules/non-exported-css/index.css create mode 100644 test/configCases/css/css-import/node_modules/non-exported-css/package.json diff --git a/test/configCases/css/css-import/directory/index.css b/test/configCases/css/css-import/directory/index.css new file mode 100644 index 00000000000..dfd5bb45b24 --- /dev/null +++ b/test/configCases/css/css-import/directory/index.css @@ -0,0 +1,3 @@ +.directory-css { + color: red; +} \ No newline at end of file diff --git a/test/configCases/css/css-import/errors.js b/test/configCases/css/css-import/errors.js new file mode 100644 index 00000000000..6d852197154 --- /dev/null +++ b/test/configCases/css/css-import/errors.js @@ -0,0 +1,4 @@ +module.exports = [ + /Can't resolve 'non-exported-css'/, + /Can't resolve '\.\/directory'/ +]; diff --git a/test/configCases/css/css-import/node_modules/non-exported-css/index.css b/test/configCases/css/css-import/node_modules/non-exported-css/index.css new file mode 100644 index 00000000000..3b220caa96f --- /dev/null +++ b/test/configCases/css/css-import/node_modules/non-exported-css/index.css @@ -0,0 +1,3 @@ +.non-exported-css{ + color: red; +} \ No newline at end of file diff --git a/test/configCases/css/css-import/node_modules/non-exported-css/package.json b/test/configCases/css/css-import/node_modules/non-exported-css/package.json new file mode 100644 index 00000000000..55c03f597b3 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/non-exported-css/package.json @@ -0,0 +1,3 @@ +{ + "name": "non-exported-css" +} \ No newline at end of file diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index e868d7060c9..9af96773c6c 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -2,4 +2,6 @@ @import "main-field"; @import "package-with-exports"; @import url("some-file.js"); -@import "js-import"; \ No newline at end of file +@import "js-import"; +@import "non-exported-css"; +@import "./directory"; \ No newline at end of file From 537f30389ba6fa83a202cc0f6ed5e0d41ec9c562 Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Tue, 13 Jun 2023 09:33:40 +0530 Subject: [PATCH 16/29] test: add test cases for custom extension and data uri --- .../ConfigTestCases.basictest.js.snap | 8 +++++++- .../css/css-import/extensions-imported.mycss | 3 +++ test/configCases/css/css-import/string-loader.js | 1 - test/configCases/css/css-import/style-import.css | 3 ++- test/configCases/css/css-import/style.css | 1 + .../configCases/css/css-import/webpack.config.js | 16 ++++++++++++++++ 6 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 test/configCases/css/css-import/extensions-imported.mycss diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 2da01c59e80..8267de3a678 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -30,6 +30,9 @@ p { color: red; } +.custom-extension{ + color: green; +}.using-loader { color: red; } body { background: black; @@ -423,6 +426,9 @@ a { color: blue; }} +a { + color: red; +} .class { content: \\"style5.css\\"; } @@ -1186,7 +1192,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/configCases/css/css-import/extensions-imported.mycss b/test/configCases/css/css-import/extensions-imported.mycss new file mode 100644 index 00000000000..d70a689d7e7 --- /dev/null +++ b/test/configCases/css/css-import/extensions-imported.mycss @@ -0,0 +1,3 @@ +.custom-extension{ + color: green; +} \ No newline at end of file diff --git a/test/configCases/css/css-import/string-loader.js b/test/configCases/css/css-import/string-loader.js index a0f115c2bea..f34eccc67ff 100644 --- a/test/configCases/css/css-import/string-loader.js +++ b/test/configCases/css/css-import/string-loader.js @@ -1,4 +1,3 @@ module.exports = function loader(content) { return content + `.using-loader { color: red; }`; }; - diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 9af96773c6c..777252c1e38 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -4,4 +4,5 @@ @import url("some-file.js"); @import "js-import"; @import "non-exported-css"; -@import "./directory"; \ No newline at end of file +@import "./directory"; +@import "./extensions-imported.mycss"; \ No newline at end of file diff --git a/test/configCases/css/css-import/style.css b/test/configCases/css/css-import/style.css index 99ede3dad05..84c0cfc3d02 100644 --- a/test/configCases/css/css-import/style.css +++ b/test/configCases/css/css-import/style.css @@ -125,6 +125,7 @@ le3.css?=bar4'); @import url(' ./string-loader.js?esModule=false!./test.css ') screen and (orientation: landscape); @import url(data:text/css;charset=utf-8,a%20%7B%0D%0A%20%20color%3A%20red%3B%0D%0A%7D); @import url(data:text/css;charset=utf-8,a%20%7B%0D%0A%20%20color%3A%20blue%3B%0D%0A%7D) screen and (orientation:landscape); +@import url("data:text/css;charset=utf-8;base64,YSB7DQogIGNvbG9yOiByZWQ7DQp9"); @import url("./style5.css?foo=1") supports(); @import url("./style5.css?foo=2") supports( ); diff --git a/test/configCases/css/css-import/webpack.config.js b/test/configCases/css/css-import/webpack.config.js index cfb8e5c0346..e3136d54919 100644 --- a/test/configCases/css/css-import/webpack.config.js +++ b/test/configCases/css/css-import/webpack.config.js @@ -4,5 +4,21 @@ module.exports = { mode: "development", experiments: { css: true + }, + resolve: { + byDependency: { + "css-import": { + extensions: [".mycss", "..."] + } + } + }, + module: { + rules: [ + { + test: /\.mycss$/, + loader: "./string-loader", + type: "css/global" + } + ] } }; From 80743decdb584af74ed2560d254bb062babbe2cc Mon Sep 17 00:00:00 2001 From: Burhanuddin Udaipurwala Date: Tue, 13 Jun 2023 09:40:03 +0530 Subject: [PATCH 17/29] test: update snapshots --- test/__snapshots__/ConfigCacheTestCases.longtest.js.snap | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index 0a103268875..504a1ada9a0 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -30,6 +30,9 @@ p { color: red; } +.custom-extension{ + color: green; +}.using-loader { color: red; } body { background: black; @@ -423,6 +426,9 @@ a { color: blue; }} +a { + color: red; +} .class { content: \\"style5.css\\"; } @@ -1186,7 +1192,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; From 57318df0654c2b37c8ea98f7c94af1415a8699a7 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 19:07:42 +0300 Subject: [PATCH 18/29] test: more --- lib/config/defaults.js | 2 +- test/configCases/css/css-import/file.less | 5 +++++ .../css/css-import/node_modules/style-library/package.json | 5 +++-- test/configCases/css/css-import/style-import.css | 3 ++- test/configCases/css/css-import/webpack.config.js | 5 +++++ test/configCases/css/css-import/with-less-import.css | 5 +++++ 6 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 test/configCases/css/css-import/file.less create mode 100644 test/configCases/css/css-import/with-less-import.css diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 2e067d52056..37afb029b39 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -1437,9 +1437,9 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { /** @type {function(): ResolveOptions} */ const styleDeps = () => ({ - conditionNames: ["style"], mainFields: ["style", "..."], mainFiles: [], + conditionNames: ["style"], extensions: [".css"] }); diff --git a/test/configCases/css/css-import/file.less b/test/configCases/css/css-import/file.less new file mode 100644 index 00000000000..a5eb48d6d65 --- /dev/null +++ b/test/configCases/css/css-import/file.less @@ -0,0 +1,5 @@ +@link-color: #428bca; + +.link { + color: @link-color; +} diff --git a/test/configCases/css/css-import/node_modules/style-library/package.json b/test/configCases/css/css-import/node_modules/style-library/package.json index fb4e6366022..4b64f1e4715 100644 --- a/test/configCases/css/css-import/node_modules/style-library/package.json +++ b/test/configCases/css/css-import/node_modules/style-library/package.json @@ -1,3 +1,4 @@ { - "style": "./styles.css" -} \ No newline at end of file + "name": "style-library", + "style": "./styles.css" +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 777252c1e38..275521fda0c 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -5,4 +5,5 @@ @import "js-import"; @import "non-exported-css"; @import "./directory"; -@import "./extensions-imported.mycss"; \ No newline at end of file +@import "./extensions-imported.mycss"; +@import "./with-less-import.css"; diff --git a/test/configCases/css/css-import/webpack.config.js b/test/configCases/css/css-import/webpack.config.js index e3136d54919..219a1ec7e3d 100644 --- a/test/configCases/css/css-import/webpack.config.js +++ b/test/configCases/css/css-import/webpack.config.js @@ -18,6 +18,11 @@ module.exports = { test: /\.mycss$/, loader: "./string-loader", type: "css/global" + }, + { + test: /\.less$/, + loader: "less-loader", + type: "css/global" } ] } diff --git a/test/configCases/css/css-import/with-less-import.css b/test/configCases/css/css-import/with-less-import.css new file mode 100644 index 00000000000..75b8a62307d --- /dev/null +++ b/test/configCases/css/css-import/with-less-import.css @@ -0,0 +1,5 @@ +@import "./file.less"; + +.foo { + color: red; +} From 805b9b61d439d8d2fb815d3a7704ea32961dd060 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 19:15:16 +0300 Subject: [PATCH 19/29] fix: prefer relative --- lib/config/defaults.js | 9 +++++++-- .../node_modules/prefer-relative.css/package.json | 4 ++++ .../node_modules/prefer-relative.css/styles.css | 3 +++ test/configCases/css/css-import/prefer-relative.css | 3 +++ test/configCases/css/css-import/style-import.css | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 test/configCases/css/css-import/node_modules/prefer-relative.css/package.json create mode 100644 test/configCases/css/css-import/node_modules/prefer-relative.css/styles.css create mode 100644 test/configCases/css/css-import/prefer-relative.css diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 37afb029b39..6287ab68f09 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -1435,12 +1435,14 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { extensions: [...jsExtensions] }); + const cssExtensions = [".css"]; + /** @type {function(): ResolveOptions} */ const styleDeps = () => ({ mainFields: ["style", "..."], mainFiles: [], conditionNames: ["style"], - extensions: [".css"] + extensions: [...cssExtensions] }); /** @type {ResolveOptions} */ @@ -1473,7 +1475,10 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { unknown: cjsDeps(), // for backward-compat: getResolve without dependencyType undefined: cjsDeps(), - "css-import": styleDeps() + "css-import": { + ...styleDeps(), + preferRelative: true + } } }; diff --git a/test/configCases/css/css-import/node_modules/prefer-relative.css/package.json b/test/configCases/css/css-import/node_modules/prefer-relative.css/package.json new file mode 100644 index 00000000000..183575c78ed --- /dev/null +++ b/test/configCases/css/css-import/node_modules/prefer-relative.css/package.json @@ -0,0 +1,4 @@ +{ + "name": "prefer-relative.css", + "style": "./styles.css" +} diff --git a/test/configCases/css/css-import/node_modules/prefer-relative.css/styles.css b/test/configCases/css/css-import/node_modules/prefer-relative.css/styles.css new file mode 100644 index 00000000000..f8ad35f95ed --- /dev/null +++ b/test/configCases/css/css-import/node_modules/prefer-relative.css/styles.css @@ -0,0 +1,3 @@ +.should-be-not-imported { + color: steelblue; +} diff --git a/test/configCases/css/css-import/prefer-relative.css b/test/configCases/css/css-import/prefer-relative.css new file mode 100644 index 00000000000..53ebf9f616d --- /dev/null +++ b/test/configCases/css/css-import/prefer-relative.css @@ -0,0 +1,3 @@ +.relative { + color: red; +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 275521fda0c..5c82a55f4a2 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -7,3 +7,4 @@ @import "./directory"; @import "./extensions-imported.mycss"; @import "./with-less-import.css"; +@import "prefer-relative.css"; From 3c4c535dd0b05c8c9a542cfa9a01e85d52806e8c Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 19:34:05 +0300 Subject: [PATCH 20/29] test: more --- lib/config/defaults.js | 51 ++++++++++++------- .../default.css | 3 ++ .../development.css | 3 ++ .../package.json | 9 ++++ .../condition-names-style/default.css | 3 ++ .../condition-names-style/package.json | 8 +++ .../css/css-import/style-import.css | 2 + 7 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-development/default.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-development/development.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-development/package.json create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style/default.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style/package.json diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 6287ab68f09..62c3b269917 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -298,7 +298,10 @@ const applyWebpackOptionsDefaults = options => { cache, context: /** @type {Context} */ (options.context), targetProperties, - mode: /** @type {Mode} */ (options.mode) + mode: /** @type {Mode} */ (options.mode), + css: + /** @type {NonNullable} */ + (options.experiments.css) }), options.resolve ); @@ -1398,9 +1401,16 @@ const applyOptimizationDefaults = ( * @param {string} options.context build context * @param {TargetProperties | false} options.targetProperties target properties * @param {Mode} options.mode mode + * @param {CssExperimentOptions|false} options.css is css enabled * @returns {ResolveOptions} resolve options */ -const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { +const getResolveDefaults = ({ + cache, + context, + targetProperties, + mode, + css +}) => { /** @type {string[]} */ const conditions = ["webpack"]; @@ -1435,16 +1445,6 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { extensions: [...jsExtensions] }); - const cssExtensions = [".css"]; - - /** @type {function(): ResolveOptions} */ - const styleDeps = () => ({ - mainFields: ["style", "..."], - mainFiles: [], - conditionNames: ["style"], - extensions: [...cssExtensions] - }); - /** @type {ResolveOptions} */ const resolveOptions = { cache, @@ -1474,14 +1474,31 @@ const getResolveDefaults = ({ cache, context, targetProperties, mode }) => { // for backward-compat: Custom Dependency unknown: cjsDeps(), // for backward-compat: getResolve without dependencyType - undefined: cjsDeps(), - "css-import": { - ...styleDeps(), - preferRelative: true - } + undefined: cjsDeps() } }; + if (css) { + const cssExtensions = [".css"]; + const styleConditions = []; + + styleConditions.push(mode === "development" ? "development" : "production"); + styleConditions.push("style"); + + /** @type {function(): ResolveOptions} */ + const styleDeps = () => ({ + mainFields: ["style", "..."], + mainFiles: [], + conditionNames: styleConditions, + extensions: [...cssExtensions] + }); + + resolveOptions.byDependency["css-import"] = { + ...styleDeps(), + preferRelative: true + }; + } + return resolveOptions; }; diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-development/default.css b/test/configCases/css/css-import/node_modules/condition-names-style-development/default.css new file mode 100644 index 00000000000..03ea02130bf --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-development/default.css @@ -0,0 +1,3 @@ +.default { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-development/development.css b/test/configCases/css/css-import/node_modules/condition-names-style-development/development.css new file mode 100644 index 00000000000..6e9ee762813 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-development/development.css @@ -0,0 +1,3 @@ +.development { + color: red; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-development/package.json b/test/configCases/css/css-import/node_modules/condition-names-style-development/package.json new file mode 100644 index 00000000000..7056c7f4fd3 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-development/package.json @@ -0,0 +1,9 @@ +{ + "name": "condition-names-style-development", + "exports": { + "style": { + "development": "development.css", + "default": "./default.css" + } + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style/default.css b/test/configCases/css/css-import/node_modules/condition-names-style/default.css new file mode 100644 index 00000000000..03ea02130bf --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style/default.css @@ -0,0 +1,3 @@ +.default { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style/package.json b/test/configCases/css/css-import/node_modules/condition-names-style/package.json new file mode 100644 index 00000000000..4d57ec4c653 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style/package.json @@ -0,0 +1,8 @@ +{ + "name": "condition-names-style", + "exports": { + "style": { + "default": "./default.css" + } + } +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 5c82a55f4a2..d4caa5e7ea5 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -8,3 +8,5 @@ @import "./extensions-imported.mycss"; @import "./with-less-import.css"; @import "prefer-relative.css"; +@import "condition-names-style"; +@import "condition-names-style-development"; From b9d33593d9d481ffeef82a64f8b9c21bded5dfb9 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 19:46:45 +0300 Subject: [PATCH 21/29] test: more --- .../ConfigTestCases.basictest.js.snap | 1052 +---------------- test/configCases/css/css-import/errors.js | 3 +- .../custom-name.css | 3 + .../condition-names-custom-name/default.css | 3 + .../condition-names-custom-name/package.json | 9 + .../condition-names-style-less/default.less | 5 + .../condition-names-style-less/package.json | 8 + .../condition-names-subpath-extra/custom.js | 1 + .../dist/custom.css | 3 + .../package.json | 6 + .../condition-names-subpath/custom.js | 1 + .../condition-names-subpath/dist/custom.css | 3 + .../condition-names-subpath/package.json | 11 + .../css/css-import/style-import.css | 6 + .../css/css-import/webpack.config.js | 1 + 15 files changed, 100 insertions(+), 1015 deletions(-) create mode 100644 test/configCases/css/css-import/node_modules/condition-names-custom-name/custom-name.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-custom-name/default.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-less/default.less create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-less/package.json create mode 100644 test/configCases/css/css-import/node_modules/condition-names-subpath-extra/custom.js create mode 100644 test/configCases/css/css-import/node_modules/condition-names-subpath-extra/dist/custom.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-subpath-extra/package.json create mode 100644 test/configCases/css/css-import/node_modules/condition-names-subpath/custom.js create mode 100644 test/configCases/css/css-import/node_modules/condition-names-subpath/dist/custom.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-subpath/package.json diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 8267de3a678..91103e8349f 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -33,6 +33,43 @@ p { .custom-extension{ color: green; }.using-loader { color: red; } +.link { + color: #428bca; +} + +.foo { + color: red; +} + +.relative { + color: red; +} + +.default { + color: steelblue; +} + +.development { + color: red; +} + +.dist { + color: steelblue; +} + +.dist { + color: steelblue; +} + +.conditional-names { + color: #428bca; +} + +.custom-name { + color: steelblue; +} + +/* Not valid */ body { background: black; @@ -1192,1019 +1229,6 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-development\\\\/development\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; - -exports[`ConfigTestCases css pure-css exported tests should compile 1`] = ` -Array [ - ".class { - color: red; -} - -.local1, -.local2 :global .global, -.local3 { - color: green; -} - -:global .global :local .local4 { - color: yellow; -} - -.local5:global(.global).local6 { - color: blue; -} - -.local7 div:not(.disabled, .mButtonDisabled, .tipOnly) { - pointer-events: initial !important; -} - -.local8 :is(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local9 :matches(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local10 :where(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local11 div:has(.disabled, .mButtonDisabled, .tipOnly) { - pointer-events: initial !important; -} - -.local12 div:current(p, span) { - background-color: yellow; -} - -.local13 div:past(p, span) { - display: none; -} - -.local14 div:future(p, span) { - background-color: yellow; -} - -.local15 div:-moz-any(ol, ul, menu, dir) { - list-style-type: square; -} - -.local16 li:-webkit-any(:first-child, :last-child) { - background-color: aquamarine; -} - -.local9 :matches(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -:global(:global(:local(.nested1)).nested2).nested3 { - color: pink; -} - -#ident { - color: purple; -} - -@keyframes localkeyframes { - 0% { - left: var(--pos1x); - top: var(--pos1y); - color: var(--theme-color1); - } - 100% { - left: var(--pos2x); - top: var(--pos2y); - color: var(--theme-color2); - } -} - -@keyframes localkeyframes2 { - 0% { - left: 0; - } - 100% { - left: 100px; - } -} - -.animation { - animation-name: localkeyframes; - animation: 3s ease-in 1s 2 reverse both paused localkeyframes, localkeyframes2; - --pos1x: 0px; - --pos1y: 0px; - --pos2x: 10px; - --pos2y: 20px; -} - -/* .composed { - composes: local1; - composes: local2; -} */ - -.vars { - color: var(--local-color); - --local-color: red; -} - -.globalVars :global { - color: var(--global-color); - --global-color: red; -} - -@media (min-width: 1600px) { - .wideScreenClass { - color: var(--local-color); - --local-color: green; - } -} - -@media screen and (max-width: 600px) { - .narrowScreenClass { - color: var(--local-color); - --local-color: purple; - } -} - -@supports (display: grid) { - .displayGridInSupports { - display: grid; - } -} - -@supports not (display: grid) { - .floatRightInNegativeSupports { - float: right; - } -} - -@supports (display: flex) { - @media screen and (min-width: 900px) { - .displayFlexInMediaInSupports { - display: flex; - } - } -} - -@media screen and (min-width: 900px) { - @supports (display: flex) { - .displayFlexInSupportsInMedia { - display: flex; - } - } -} - -@MEDIA screen and (min-width: 900px) { - @SUPPORTS (display: flex) { - .displayFlexInSupportsInMediaUpperCase { - display: flex; - } - } -} - -.animationUpperCase { - ANIMATION-NAME: localkeyframesUPPERCASE; - ANIMATION: 3s ease-in 1s 2 reverse both paused localkeyframesUPPERCASE, localkeyframes2UPPPERCASE; - --pos1x: 0px; - --pos1y: 0px; - --pos2x: 10px; - --pos2y: 20px; -} - -@KEYFRAMES localkeyframesUPPERCASE { - 0% { - left: VAR(--pos1x); - top: VAR(--pos1y); - color: VAR(--theme-color1); - } - 100% { - left: VAR(--pos2x); - top: VAR(--pos2y); - color: VAR(--theme-color2); - } -} - -@KEYframes localkeyframes2UPPPERCASE { - 0% { - left: 0; - } - 100% { - left: 100px; - } -} - -:GLOBAL .globalUpperCase :LOCAL .localUpperCase { - color: yellow; -} - -.VARS { - color: VAR(--LOCAL-COLOR); - --LOCAL-COLOR: red; -} - -.globalVarsUpperCase :GLOBAL { - COLOR: VAR(--GLOBAR-COLOR); - --GLOBAR-COLOR: red; -} - -@supports (top: env(safe-area-inset-top, 0)) { - .inSupportScope { - color: red; - } -} - -.a { - animation: 3s animationName; - -webkit-animation: 3s animationName; -} - -.b { - animation: animationName 3s; - -webkit-animation: animationName 3s; -} - -.c { - animation-name: animationName; - -webkit-animation-name: animationName; -} - -.d { - --animation-name: animationName; -} - -@keyframes animationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@-webkit-keyframes animationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@-moz-keyframes mozAnimationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@counter-style thumbs { - system: cyclic; - symbols: \\"\\\\1F44D\\"; - suffix: \\" \\"; -} - -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} - -/* At-rule for \\"nice-style\\" in Font Two */ -@font-feature-values Font Two { - @styleset { - nice-style: 4; - } -} - -@property --my-color { - syntax: \\"\\"; - inherits: false; - initial-value: #c0ffee; -} - -.class { - color: var(--my-color); -} - -@layer utilities { - .padding-sm { - padding: 0.5rem; - } - - .padding-lg { - padding: 0.8rem; - } -} - -.class { - color: red; - - .nested-pure { - color: red; - } - - @media screen and (min-width: 200px) { - color: blue; - - .nested-media { - color: blue; - } - } - - @supports (display: flex) { - display: flex; - - .nested-supports { - display: flex; - } - } - - @layer foo { - background: red; - - .nested-layer { - background: red; - } - } - - @container foo { - background: red; - - .nested-layer { - background: red; - } - } -} - -.not-selector-inside { - color: #fff; - opacity: 0.12; - padding: .5px; - unknown: :local(.test); - unknown1: :local .test; - unknown2: :global .test; - unknown3: :global .test; - unknown4: .foo, .bar, #bar; -} - -@unknown :local .local :global .global { - color: red; -} - -@unknown :local(.local) :global(.global) { - color: red; -} - -.nested-var { - .again { - color: var(--local-color); - } -} - -.nested-with-local-pseudo { - color: red; - - :local .local-nested { - color: red; - } - - :global .global-nested { - color: red; - } - - :local(.local-nested) { - color: red; - } - - :global(.global-nested) { - color: red; - } - - :local .local-nested, :global .global-nested-next { - color: red; - } - - :local(.local-nested), :global(.global-nested-next) { - color: red; - } - - :global .foo, .bar { - color: red; - } -} - -#id-foo { - color: red; - - #id-bar { - color: red; - } -} - -.nested-parens { - .local9 div:has(.vertical-tiny, .vertical-small) { - max-height: 0; - margin: 0; - overflow: hidden; - } -} - -:global .global-foo { - .nested-global { - color: red; - } - - :local .local-in-global { - color: blue; - } -} - -@unknown .class { - color: red; - - .class { - color: red; - } -} - -:global .class :local .in-local-global-scope, -:global .class :local .in-local-global-scope, -:local .class-local-scope :global .in-local-global-scope { - color: red; -} - -@container (width > 400px) { - .class-in-container { - font-size: 1.5em; - } -} - -@container summary (min-width: 400px) { - @container (width > 400px) { - .deep-class-in-container { - font-size: 1.5em; - } - } -} - -:scope { - color: red; -} - -.placeholder-gray-700:-ms-input-placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} -.placeholder-gray-700::-ms-input-placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} -.placeholder-gray-700::placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} - -:root { - --test: dark; -} - -@media screen and (prefers-color-scheme: var(--test)) { - .baz { - color: white; - } -} - -@keyframes slidein { - from { - margin-left: 100%; - width: 300%; - } - - to { - margin-left: 0%; - width: 100%; - } -} - -.class { - animation: - foo var(--animation-name) 3s, - var(--animation-name) 3s, - 3s linear 1s infinite running slidein, - 3s linear env(foo, var(--baz)) infinite running slidein; -} - -:root { - --baz: 10px; -} - -.class { - bar: env(foo, var(--baz)); -} - -:global .global-foo, :local .bar { - :local .local-in-global { - color: blue; - } - - @media screen { - :global .my-global-class-again, - :local .my-global-class-again { - color: red; - } - } -} - -.first-nested { - .first-nested-nested { - color: red; - } -} - -.first-nested-at-rule { - @media screen { - .first-nested-nested-at-rule-deep { - color: red; - } - } -} - -:global .again-global { - color:red; -} - -:global .again-again-global { - :global .again-again-global { - color: red; - } -} - -:root { - --foo: red; -} - -:global .again-again-global { - color: var(--foo); - - :global .again-again-global { - color: var(--foo); - } -} - -:global .again-again-global { - animation: slidein 3s; - - :global .again-again-global, .class, :global(:global(:local(.nested1)).nested2).nested3 { - animation: slidein 3s; - } - - .local2 :global .global, - .local3 { - color: red; - } -} - -@unknown var(--foo) { - color: red; -} - -.class { - .class { - .class { - .class {} - } - } -} - -.class { - .class { - .class { - .class { - animation: slidein 3s; - } - } - } -} - -.class { - animation: slidein 3s; - .class { - animation: slidein 3s; - .class { - animation: slidein 3s; - .class { - animation: slidein 3s; - } - } - } -} - -.class { - color: red; - background: var(--color); -} - -@keyframes test { - 0% { - color: red; - } - 100% { - color: blue; - } -} - -:local(.class) { - color: red; -} - -:local .class { - color: green; -} - -:global(.class) { - color: blue; -} - -:global .class { - color: white; -} - -:export { - foo: bar; -} - -.class { - animation: test 1s, test; -} - -head{--webpack-main:\\\\.\\\\.\\\\/css-modules\\\\/style\\\\.module\\\\.css,\\\\.\\\\/style\\\\.css;}", -] -`; - -exports[`ConfigTestCases css urls exported tests should be able to handle styles in div.css 1`] = ` -Object { - "--foo": " url(img.09a1a1112c577c279435.png)", - "--foo-bar": " \\"http://www.example.com/pinkish.gif\\"", - "/* TODO fix me */ - /*a146": " url('./img.png', 'foo', './img.png', url('./img.png'));*/ - /*a147: image-set(url('./img.png', 'foo', './img.png', url('./img.png')) 1x, url(\\"./img2x.png\\") 2x);*/ -", - "a": " url(img.09a1a1112c577c279435.png)", - "a1": " url(img.09a1a1112c577c279435.png)", - "a10": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", - "a100": " url(img\\\\)img.09a1a1112c577c279435.png)", - "a101": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a102": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a103": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a104": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a105": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a106": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a107": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", - "a108": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a109": " url(img\\\\'img.09a1a1112c577c279435.png)", - "a11": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", - "a110": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a111": " url(img\\\\)img.09a1a1112c577c279435.png)", - "a112": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a113": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", - "a114": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a115": " url(img\\\\'img.09a1a1112c577c279435.png)", - "a116": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a117": " url(img\\\\)img.09a1a1112c577c279435.png)", - "a118": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a119": " url(img.09a1a1112c577c279435.png)", - "a12": " green url(img.09a1a1112c577c279435.png) xyz", - "a120": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", - "a121": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a122": " url(img\\\\'img.09a1a1112c577c279435.png)", - "a123": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a124": " url(img\\\\)img.09a1a1112c577c279435.png)", - "a125": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a126": " url(img.09a1a1112c577c279435.png)", - "a127": " url(img.09a1a1112c577c279435.png)", - "a128": " url(img\\\\'img.09a1a1112c577c279435.png)", - "a129": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a13": " green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz", - "a130": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a131": " url(img.09a1a1112c577c279435.png)", - "a132": " url(img.09a1a1112c577c279435.png)", - "a133": " url(img.09a1a1112c577c279435.png?foo=bar)", - "a134": " url(img.09a1a1112c577c279435.png?foo=bar)", - "a135": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", - "a136": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", - "a137": " url(img.09a1a1112c577c279435.png?foo=bar)", - "a138": " url(img.09a1a1112c577c279435.png?bar=foo)", - "a139": " url(img.09a1a1112c577c279435.png?foo=bar#foo)", - "a14": " url(\\"data:image/svg+xml;charset=utf-8,\\")", - "a140": " url(img.09a1a1112c577c279435.png?bar=foo#bar)", - "a141": " url(img.09a1a1112c577c279435.png?foo=1&bar=2)", - "a142": " url(img.09a1a1112c577c279435.png?foo=2&bar=1)", - "a143": " url(data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20width%3D%22191px%22%20height%3D%22191px%22%20viewBox%3D%220%200%20191%20191%22%20enable-background%3D%22new%200%200%20191%20191%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M95.5%2C0C42.8%2C0%2C0%2C42.8%2C0%2C95.5S42.8%2C191%2C95.5%2C191S191%2C148.2%2C191%2C95.5S148.2%2C0%2C95.5%2C0z%20M95.5%2C187.6%0A%09c-50.848%2C0-92.1-41.25-92.1-92.1c0-50.848%2C41.252-92.1%2C92.1-92.1c50.85%2C0%2C92.1%2C41.252%2C92.1%2C92.1%0A%09C187.6%2C146.35%2C146.35%2C187.6%2C95.5%2C187.6z%22%2F%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M92.9%2C10v8.6H91v-6.5c-0.1%2C0.1-0.2%2C0.2-0.4%2C0.3c-0.2%2C0.1-0.3%2C0.2-0.4%2C0.2c-0.1%2C0-0.3%2C0.1-0.5%2C0.2%0A%09%09c-0.2%2C0.1-0.3%2C0.1-0.5%2C0.1v-1.6c0.5-0.1%2C0.9-0.3%2C1.4-0.5c0.5-0.2%2C0.8-0.5%2C1.2-0.7h1.1V10z%22%2F%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M97.1%2C17.1h3.602v1.5h-5.6V18c0-0.4%2C0.1-0.8%2C0.2-1.2c0.1-0.4%2C0.3-0.6%2C0.5-0.9c0.2-0.3%2C0.5-0.5%2C0.7-0.7%0A%09%09c0.2-0.2%2C0.5-0.4%2C0.7-0.6c0.199-0.2%2C0.5-0.3%2C0.6-0.5c0.102-0.2%2C0.301-0.3%2C0.5-0.5c0.2-0.2%2C0.2-0.3%2C0.301-0.5%0A%09%09c0.101-0.2%2C0.101-0.3%2C0.101-0.5c0-0.4-0.101-0.6-0.3-0.8c-0.2-0.2-0.4-0.3-0.801-0.3c-0.699%2C0-1.399%2C0.3-2.101%2C0.9v-1.6%0A%09%09c0.7-0.5%2C1.5-0.7%2C2.5-0.7c0.399%2C0%2C0.8%2C0.1%2C1.101%2C0.2c0.301%2C0.1%2C0.601%2C0.3%2C0.899%2C0.5c0.3%2C0.2%2C0.399%2C0.5%2C0.5%2C0.8%0A%09%09c0.101%2C0.3%2C0.2%2C0.6%2C0.2%2C1s-0.102%2C0.7-0.2%2C1c-0.099%2C0.3-0.3%2C0.6-0.5%2C0.8c-0.2%2C0.2-0.399%2C0.5-0.7%2C0.7c-0.3%2C0.2-0.5%2C0.4-0.8%2C0.6%0A%09%09c-0.2%2C0.1-0.399%2C0.3-0.5%2C0.4s-0.3%2C0.3-0.5%2C0.4s-0.2%2C0.3-0.3%2C0.4C97.1%2C17%2C97.1%2C17%2C97.1%2C17.1z%22%2F%3E%0A%3C%2Fg%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M15%2C95.4c0%2C0.7-0.1%2C1.4-0.2%2C2c-0.1%2C0.6-0.4%2C1.1-0.7%2C1.5C13.8%2C99.3%2C13.4%2C99.6%2C12.9%2C99.8s-1%2C0.3-1.5%2C0.3%0A%09%09c-0.7%2C0-1.3-0.1-1.8-0.3v-1.5c0.4%2C0.3%2C1%2C0.4%2C1.6%2C0.4c0.6%2C0%2C1.1-0.2%2C1.5-0.7c0.4-0.5%2C0.5-1.1%2C0.5-1.9l0%2C0%0A%09%09C12.8%2C96.7%2C12.3%2C96.9%2C11.5%2C96.9c-0.3%2C0-0.7-0.102-1-0.2c-0.3-0.101-0.5-0.3-0.8-0.5c-0.3-0.2-0.4-0.5-0.5-0.8%0A%09%09c-0.1-0.3-0.2-0.7-0.2-1c0-0.4%2C0.1-0.8%2C0.2-1.2c0.1-0.4%2C0.3-0.7%2C0.6-0.9c0.3-0.2%2C0.6-0.5%2C0.9-0.6c0.3-0.1%2C0.8-0.2%2C1.2-0.2%0A%09%09c0.5%2C0%2C0.9%2C0.1%2C1.2%2C0.3c0.3%2C0.2%2C0.7%2C0.4%2C0.9%2C0.8s0.5%2C0.7%2C0.6%2C1.2S15%2C94.8%2C15%2C95.4z%20M13.1%2C94.4c0-0.2%2C0-0.4-0.1-0.6%0A%09%09c-0.1-0.2-0.1-0.4-0.2-0.5c-0.1-0.1-0.2-0.2-0.4-0.3c-0.2-0.1-0.3-0.1-0.5-0.1c-0.2%2C0-0.3%2C0-0.4%2C0.1s-0.3%2C0.2-0.3%2C0.3%0A%09%09c0%2C0.1-0.2%2C0.3-0.2%2C0.4c0%2C0.1-0.1%2C0.4-0.1%2C0.6c0%2C0.2%2C0%2C0.4%2C0.1%2C0.6c0.1%2C0.2%2C0.1%2C0.3%2C0.2%2C0.4c0.1%2C0.1%2C0.2%2C0.2%2C0.4%2C0.3%0A%09%09c0.2%2C0.1%2C0.3%2C0.1%2C0.5%2C0.1c0.2%2C0%2C0.3%2C0%2C0.4-0.1s0.2-0.2%2C0.3-0.3c0.1-0.1%2C0.2-0.2%2C0.2-0.4C13%2C94.7%2C13.1%2C94.6%2C13.1%2C94.4z%22%2F%3E%0A%3C%2Fg%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M176%2C99.7V98.1c0.6%2C0.4%2C1.2%2C0.602%2C2%2C0.602c0.5%2C0%2C0.8-0.102%2C1.1-0.301c0.301-0.199%2C0.4-0.5%2C0.4-0.801%0A%09%09c0-0.398-0.2-0.699-0.5-0.898c-0.3-0.2-0.8-0.301-1.3-0.301h-0.802V95h0.701c1.101%2C0%2C1.601-0.4%2C1.601-1.1c0-0.7-0.4-1-1.302-1%0A%09%09c-0.6%2C0-1.1%2C0.2-1.6%2C0.5v-1.5c0.6-0.3%2C1.301-0.4%2C2.1-0.4c0.9%2C0%2C1.5%2C0.2%2C2%2C0.6s0.701%2C0.9%2C0.701%2C1.5c0%2C1.1-0.601%2C1.8-1.701%2C2.1l0%2C0%0A%09%09c0.602%2C0.1%2C1.102%2C0.3%2C1.4%2C0.6s0.5%2C0.8%2C0.5%2C1.3c0%2C0.801-0.3%2C1.4-0.9%2C1.9c-0.6%2C0.5-1.398%2C0.7-2.398%2C0.7%0A%09%09C177.2%2C100.1%2C176.5%2C100%2C176%2C99.7z%22%2F%3E%0A%3C%2Fg%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M98.5%2C179.102c0%2C0.398-0.1%2C0.799-0.2%2C1.199C98.2%2C180.7%2C98%2C181%2C97.7%2C181.2s-0.601%2C0.5-0.9%2C0.601%0A%09%09c-0.3%2C0.1-0.7%2C0.199-1.2%2C0.199c-0.5%2C0-0.9-0.1-1.3-0.3c-0.4-0.2-0.7-0.399-0.9-0.8c-0.2-0.4-0.5-0.7-0.6-1.2%0A%09%09c-0.1-0.5-0.2-1-0.2-1.601c0-0.699%2C0.1-1.399%2C0.3-2c0.2-0.601%2C0.4-1.101%2C0.8-1.5c0.4-0.399%2C0.7-0.699%2C1.2-1c0.5-0.3%2C1-0.3%2C1.6-0.3%0A%09%09c0.6%2C0%2C1.2%2C0.101%2C1.5%2C0.199v1.5c-0.4-0.199-0.9-0.399-1.4-0.399c-0.3%2C0-0.6%2C0.101-0.8%2C0.2c-0.2%2C0.101-0.5%2C0.3-0.7%2C0.5%0A%09%09c-0.2%2C0.199-0.3%2C0.5-0.4%2C0.8c-0.1%2C0.301-0.2%2C0.7-0.2%2C1.101l0%2C0c0.4-0.601%2C1-0.8%2C1.8-0.8c0.3%2C0%2C0.7%2C0.1%2C0.9%2C0.199%0A%09%09c0.2%2C0.101%2C0.5%2C0.301%2C0.7%2C0.5c0.199%2C0.2%2C0.398%2C0.5%2C0.5%2C0.801C98.5%2C178.2%2C98.5%2C178.7%2C98.5%2C179.102z%20M96.7%2C179.2%0A%09%09c0-0.899-0.4-1.399-1.1-1.399c-0.2%2C0-0.3%2C0-0.5%2C0.1c-0.2%2C0.101-0.3%2C0.201-0.4%2C0.301c-0.1%2C0.101-0.2%2C0.199-0.2%2C0.4%0A%09%09c0%2C0.199-0.1%2C0.299-0.1%2C0.5c0%2C0.199%2C0%2C0.398%2C0.1%2C0.6s0.1%2C0.3%2C0.2%2C0.5c0.1%2C0.199%2C0.2%2C0.199%2C0.4%2C0.3c0.2%2C0.101%2C0.3%2C0.101%2C0.5%2C0.101%0A%09%09c0.2%2C0%2C0.3%2C0%2C0.5-0.101c0.2-0.101%2C0.301-0.199%2C0.301-0.3c0-0.1%2C0.199-0.301%2C0.199-0.399C96.6%2C179.7%2C96.7%2C179.4%2C96.7%2C179.2z%22%2F%3E%0A%3C%2Fg%3E%0A%3Ccircle%20fill%3D%22%23636363%22%20cx%3D%2295%22%20cy%3D%2295%22%20r%3D%227%22%2F%3E%0A%3C%2Fsvg%3E%0A) 50% 50%/191px no-repeat", - "a144": " url(img.09a1a1112c577c279435.png)", - "a145": " url(img.09a1a1112c577c279435.png)", - "a148": " url('data:image/svg+xml,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Crect width=\\"100%25\\" height=\\"100%25\\" style=\\"stroke: rgb(223,224,225); stroke-width: 2px; fill: none; stroke-dasharray: 6px 3px\\" /%3E%3C/svg%3E')", - "a149": " url('data:image/svg+xml,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Crect width=\\"100%25\\" height=\\"100%25\\" style=\\"stroke: rgb(223,224,225); stroke-width: 2px; fill: none; stroke-dasharray: 6px 3px\\" /%3E%3C/svg%3E')", - "a15": " url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E)", - "a150": " url('data:image/svg+xml,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Crect width=\\"100%25\\" height=\\"100%25\\" style=\\"stroke: rgb(223,224,225); stroke-width: 2px; fill: none; stroke-dasharray: 6px 3px\\" /%3E%3C/svg%3E')", - "a151": " url('data:image/svg+xml;utf8,')", - "a152": " url(img.09a1a1112c577c279435.png)", - "a153": " url(img.09a1a1112c577c279435.png)", - "a154": " url(other.09a1a1112c577c279435.png)", - "a155": " url(img.09a1a1112c577c279435.png)", - "a156": " url(\\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e\\")", - "a157": " url('data:image/svg+xml;utf8,')", - "a158": " src(\\"http://www.example.com/pinkish.gif\\")", - "a159": " src(var(--foo))", - "a16": " url('data:image/svg+xml;charset=utf-8,#filter')", - "a160": " url(img.09a1a1112c577c279435.png param(--color var(--primary-color)))", - "a161": " src(\\"img.png\\" param(--color var(--primary-color)))", - "a162": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a163": " url(img.09a1a1112c577c279435.png)", - "a164": " url( img.png bug)", - "a165": " url(imgn.09a1a1112c577c279435.png)", - "a166": " url('data:image/svg+xml;utf8,')", - "a167": " url(http://example.com/image.jpg)", - "a168": " url(http://example.com/image.jpg)", - "a169": " url(data:,)", - "a17": " url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter\\")", - "a170": " url(data:,)", - "a171": " image(ltr 'img.png#xywh=0,0,16,16', red)", - "a172": " image-set( - linear-gradient(blue, white) 1x, - linear-gradient(blue, green) 2x - )", - "a173": " image-set( - url(img.09a1a1112c577c279435.png) type(\\"image/png\\"), - url(img.09a1a1112c577c279435.png) type(\\"image/png\\") - )", - "a174": " image-set( - url(img.09a1a1112c577c279435.png) 1x, - url(img.09a1a1112c577c279435.png) 2x - )", - "a175": " image-set( - url(img.09a1a1112c577c279435.png) 1x, - url(img.09a1a1112c577c279435.png) 2x, - url(img.09a1a1112c577c279435.png) 3x - )", - "a176": " image-set( - url(img.09a1a1112c577c279435.png) type(\\"image/png\\"), - url(img.09a1a1112c577c279435.png) type(\\"image/png\\") - ) \\"img.png\\"", - "a177": " image-set( - url(img.09a1a1112c577c279435.png) 1x type(\\"image/png\\"), - url(img.09a1a1112c577c279435.png) 2x type(\\"image/png\\") - )", - "a178": " image-set( - url(img.09a1a1112c577c279435.png) type(\\"image/png\\") 1x, - url(img.09a1a1112c577c279435.png) type(\\"image/png\\") 2x - )", - "a179": " -webkit-image-set( - url(img.09a1a1112c577c279435.png) 1x - )", - "a18": " url(#highlight)", - "a180": " -webkit-image-set( - url(img.09a1a1112c577c279435.png var(--foo, \\"test.png\\")) 1x - )", - "a181": " src( \\"img.png\\" )", - "a182": " src('img.png')", - "a183": " src('img.png' var(--foo, \\"test.png\\"))", - "a184": " src(var(--foo, \\"test.png\\"))", - "a185": " src(\\" img.png \\")", - "a186": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", - "a187": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", - "a188": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", - "a189": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", - "a19": " url(#line-marker)", - "a190": " image-set(url(img.09a1a1112c577c279435.png)1x)", - "a191": " image-set(url(img.09a1a1112c577c279435.png)1x/* test*/,/* test*/url(img.09a1a1112c577c279435.png)2x)", - "a197": " \\\\u\\\\r\\\\l(img.09a1a1112c577c279435.png)", - "a198": " \\\\image-\\\\set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", - "a199": " \\\\-webk\\\\it-image-set(url(img.09a1a1112c577c279435.png)1x)", - "a2": " url(img.09a1a1112c577c279435.png)", - "a200": "-webkit-image-set(url(img.09a1a1112c577c279435.png)1x)", - "a22": " \\"do not use url(path)\\"", - "a23": " 'do not \\"use\\" url(path)'", - "a24": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x) -", - "a25": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x) -", - "a26": " green url() xyz", - "a27": " green url('') xyz", - "a28": " green url(\\"\\") xyz", - "a29": " green url(' ') xyz", - "a3": " url(img.09a1a1112c577c279435.png)", - "a30": " green url( - ) xyz", - "a4": " url(img.09a1a1112c577c279435.png#hash)", - "a40": " green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz", - "a41": " green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz", - "a42": " url(img.09a1a1112c577c279435.png?foo)", - "a43": " url(img.09a1a1112c577c279435.png?foo=bar)", - "a44": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", - "a45": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", - "a46": " url(img.09a1a1112c577c279435.png?)", - "a47": " url(img.09a1a1112c577c279435.png) url(\\"data:image/svg+xml;charset=utf-8,\\") url(img.09a1a1112c577c279435.png)", - "a48": " __URL__()", - "a49": " url(img-simple.09a1a1112c577c279435.png)", - "a5": " url( - img.09a1a1112c577c279435.png - )", - "a50": " url(img-simple.09a1a1112c577c279435.png)", - "a51": " url(img-simple.09a1a1112c577c279435.png)", - "a52": " url(img.09a1a1112c577c279435.png)", - "a53": " url(img.09a1a1112c577c279435.png)", - "a55": " -webkit-image-set()", - "a56": " image-set()", - "a58": " image-set('')", - "a59": " image-set(\\"\\")", - "a6": " green url( img.09a1a1112c577c279435.png ) xyz", - "a60": " image-set(\\"\\" 1x)", - "a61": " image-set(url())", - "a62": " image-set( - url() - )", - "a63": " image-set(URL())", - "a64": " image-set(url(''))", - "a65": " image-set(url(\\"\\"))", - "a66": " image-set(url('') 1x)", - "a67": " image-set(1x)", - "a68": " image-set( - 1x - )", - "a69": " image-set(calc(1rem + 1px) 1x)", - "a7": " green url( img.09a1a1112c577c279435.png ) xyz", - "a70": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", - "a71": " image-set(url(img1x.09a1a1112c577c279435.png) 1x)", - "a72": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", - "a73": " image-set(url(img\\\\ img.09a1a1112c577c279435.png) 1x, url(img\\\\ img.09a1a1112c577c279435.png) 2x)", - "a74": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x), - image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", - "a75": " image-set( - url(img1x.09a1a1112c577c279435.png) 1x, - url(img2x.09a1a1112c577c279435.png) 2x, - url(img3x.09a1a1112c577c279435.png) 600dpi - )", - "a76": " image-set(url(img1x.09a1a1112c577c279435.png?foo=bar) 1x)", - "a77": " image-set(url(img1x.09a1a1112c577c279435.png#hash) 1x)", - "a78": " image-set(url(img1x.09a1a1112c577c279435.png?#iefix) 1x)", - "a79": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", - "a8": " green url(img.09a1a1112c577c279435.png) xyz", - "a80": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x)", - "a81": " -webkit-image-set( - url(img1x.09a1a1112c577c279435.png) 1x - )", - "a82": " image-set(url(img1x.09a1a1112c577c279435.png) 1x)", - "a83": " image-set( - url(img1x.09a1a1112c577c279435.png) 1x - )", - "a84": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", - "a85": " image-set( - url(img1x.09a1a1112c577c279435.png) 1x, - url(img2x.09a1a1112c577c279435.png) 2x, - url(img3x.09a1a1112c577c279435.png) 600dpi - )", - "a86": " image-set(url(img\\\\ img.09a1a1112c577c279435.png) 1x, url(img\\\\ img.09a1a1112c577c279435.png) 2x)", - "a87": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", - "a88": " url(imgimg.09a1a1112c577c279435.png)", - "a89": " url(img\\\\'img.09a1a1112c577c279435.png)", - "a9": " green url(img.09a1a1112c577c279435.png) url(other-img.09a1a1112c577c279435.png) xyz", - "a90": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", - "a91": " url(img\\\\(img.09a1a1112c577c279435.png)", - "a92": " url(img\\\\)img.09a1a1112c577c279435.png)", - "a93": " url(img\\\\ img.09a1a1112c577c279435.png)", - "a94": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a95": " image-set( - url(imgimg.09a1a1112c577c279435.png) 1x, - url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png) 2x, - url(img\\\\'img.09a1a1112c577c279435.png) 3x, - url(img\\\\(img.09a1a1112c577c279435.png) 4x, - url(img\\\\)img.09a1a1112c577c279435.png) 5x, - url(img\\\\ img.09a1a1112c577c279435.png) 6x, - url(\\"img'() img.09a1a1112c577c279435.png\\") 7x - )", - "a96": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", - "a97": " url(\\"img'() img.09a1a1112c577c279435.png\\")", - "a98": " url(img\\\\'img.09a1a1112c577c279435.png)", - "a99": " url(img\\\\(img.09a1a1112c577c279435.png)", - "b": " url(img.09a1a1112c577c279435.png)", - "c": " url(img.09a1a1112c577c279435.png)", - "d": " url(img.09a1a1112c577c279435.png#hash)", - "e": " url( - img.09a1a1112c577c279435.png - )", - "f": " green url( img.09a1a1112c577c279435.png ) xyz", - "g": " green url( img.09a1a1112c577c279435.png ) xyz", - "getPropertyValue": [Function], - "h": " green url(img.09a1a1112c577c279435.png) xyz", - "i": " green url(img.09a1a1112c577c279435.png) url(img.09a1a1112c577c279435.png) xyz", - "j": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", - "k": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", - "l": " green url(img.09a1a1112c577c279435.png) xyz", - "m": " green url(img.09a1a1112c577c279435.png) xyz", - "n": " green url(img.09a1a1112c577c279435.png) xyz", -} -`; - -exports[`ConfigTestCases custom-modules json-custom exported tests should transform toml to json 1`] = ` -Object { - "owner": Object { - "bio": "GitHub Cofounder & CEO -Likes tater tots and beer.", - "dob": "1979-05-27T07:32:00.000Z", - "name": "Tom Preston-Werner", - "organization": "GitHub", - }, - "title": "TOML Example", -} -`; - -exports[`ConfigTestCases records issue-2991 exported tests should write relative paths to records 1`] = ` -"{ - \\"chunks\\": { - \\"byName\\": { - \\"main\\": 179 - }, - \\"bySource\\": { - \\"0 main\\": 179 - }, - \\"usedIds\\": [ - 179 - ] - }, - \\"modules\\": { - \\"byIdentifier\\": { - \\"./test.js\\": 393, - \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, - \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17, - \\"ignored|./.|pkgs/somepackage/foo\\": 802 - }, - \\"usedIds\\": [ - 17, - 147, - 393, - 802 - ] - } -}" -`; - -exports[`ConfigTestCases records issue-7339 exported tests should write relative dynamic-require paths to records 1`] = ` -"{ - \\"chunks\\": { - \\"byName\\": { - \\"main\\": 179 - }, - \\"bySource\\": { - \\"0 main\\": 179 - }, - \\"usedIds\\": [ - 179 - ] - }, - \\"modules\\": { - \\"byIdentifier\\": { - \\"./dependencies/bar.js\\": 379, - \\"./dependencies/foo.js\\": 117, - \\"./dependencies|sync|/^\\\\\\\\.\\\\\\\\/.*$/\\": 412, - \\"./test.js\\": 393, - \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, - \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17 - }, - \\"usedIds\\": [ - 17, - 117, - 147, - 379, - 393, - 412 - ] - } -}" -`; diff --git a/test/configCases/css/css-import/errors.js b/test/configCases/css/css-import/errors.js index 6d852197154..2acea2c2b91 100644 --- a/test/configCases/css/css-import/errors.js +++ b/test/configCases/css/css-import/errors.js @@ -1,4 +1,5 @@ module.exports = [ /Can't resolve 'non-exported-css'/, - /Can't resolve '\.\/directory'/ + /Can't resolve '\.\/directory'/, + /Can't resolve 'condition-names-subpath\/non-valid\.css'/ ]; diff --git a/test/configCases/css/css-import/node_modules/condition-names-custom-name/custom-name.css b/test/configCases/css/css-import/node_modules/condition-names-custom-name/custom-name.css new file mode 100644 index 00000000000..438223bb105 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-custom-name/custom-name.css @@ -0,0 +1,3 @@ +.custom-name { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-custom-name/default.css b/test/configCases/css/css-import/node_modules/condition-names-custom-name/default.css new file mode 100644 index 00000000000..03ea02130bf --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-custom-name/default.css @@ -0,0 +1,3 @@ +.default { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json b/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json new file mode 100644 index 00000000000..58c0b5fade5 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json @@ -0,0 +1,9 @@ +{ + "name": "condition-names-custom-name", + "exports": { + "style": { + "custom-name": "./custom-name.css", + "default": "./default.css" + } + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-less/default.less b/test/configCases/css/css-import/node_modules/condition-names-style-less/default.less new file mode 100644 index 00000000000..37deb87d851 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-less/default.less @@ -0,0 +1,5 @@ +@link-color: #428bca; + +.conditional-names { + color: @link-color; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json b/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json new file mode 100644 index 00000000000..2b142a00b40 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json @@ -0,0 +1,8 @@ +{ + "name": "condition-names-style-less", + "exports": { + "style": { + "default": "./default.less" + } + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/custom.js b/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/custom.js new file mode 100644 index 00000000000..b77c717214b --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/custom.js @@ -0,0 +1 @@ +export default "should not be used"; diff --git a/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/dist/custom.css b/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/dist/custom.css new file mode 100644 index 00000000000..7920c3d9f42 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/dist/custom.css @@ -0,0 +1,3 @@ +.dist { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/package.json b/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/package.json new file mode 100644 index 00000000000..795cf640f88 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-subpath-extra/package.json @@ -0,0 +1,6 @@ +{ + "name": "condition-names-subpath-extra", + "exports": { + "./custom.css":"./dist/custom.css" + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-subpath/custom.js b/test/configCases/css/css-import/node_modules/condition-names-subpath/custom.js new file mode 100644 index 00000000000..b77c717214b --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-subpath/custom.js @@ -0,0 +1 @@ +export default "should not be used"; diff --git a/test/configCases/css/css-import/node_modules/condition-names-subpath/dist/custom.css b/test/configCases/css/css-import/node_modules/condition-names-subpath/dist/custom.css new file mode 100644 index 00000000000..7920c3d9f42 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-subpath/dist/custom.css @@ -0,0 +1,3 @@ +.dist { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-subpath/package.json b/test/configCases/css/css-import/node_modules/condition-names-subpath/package.json new file mode 100644 index 00000000000..8c94521a959 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-subpath/package.json @@ -0,0 +1,11 @@ +{ + "name": "condition-names-subpath", + "exports": { + "./custom.css": { + "default": "./dist/custom.css" + }, + "./non-valid.css": { + "default": "./dist/custom.js" + } + } +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index d4caa5e7ea5..a8f6eff96cf 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -10,3 +10,9 @@ @import "prefer-relative.css"; @import "condition-names-style"; @import "condition-names-style-development"; +@import "condition-names-subpath/custom.css"; +/* Not valid */ +@import "condition-names-subpath/non-valid.css"; +@import "condition-names-subpath-extra/custom.css"; +@import "condition-names-style-less"; +@import "condition-names-custom-name"; diff --git a/test/configCases/css/css-import/webpack.config.js b/test/configCases/css/css-import/webpack.config.js index 219a1ec7e3d..8851afb1397 100644 --- a/test/configCases/css/css-import/webpack.config.js +++ b/test/configCases/css/css-import/webpack.config.js @@ -8,6 +8,7 @@ module.exports = { resolve: { byDependency: { "css-import": { + conditionNames: ["custom-name", "..."], extensions: [".mycss", "..."] } } From 5f56793ad78f5a327f618a7fbfb3e000594f9b2b Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 20:09:30 +0300 Subject: [PATCH 22/29] test: more --- lib/config/defaults.js | 7 ++++--- .../default.css | 0 .../mode.css} | 2 +- .../package.json | 3 ++- .../node_modules/condition-names-webpack-js/package.json | 8 ++++++++ .../node_modules/condition-names-webpack-js/webpack.js | 1 + .../node_modules/condition-names-webpack/package.json | 8 ++++++++ .../node_modules/condition-names-webpack/webpack.css | 3 +++ .../node_modules/style-and-main-library/main.css | 3 +++ .../node_modules/style-and-main-library/package.json | 4 ++++ .../node_modules/style-and-main-library/styles.css | 3 +++ test/configCases/css/css-import/style-import.css | 5 ++++- 12 files changed, 41 insertions(+), 6 deletions(-) rename test/configCases/css/css-import/node_modules/{condition-names-style-development => condition-names-style-mode}/default.css (100%) rename test/configCases/css/css-import/node_modules/{condition-names-style-development/development.css => condition-names-style-mode/mode.css} (50%) rename test/configCases/css/css-import/node_modules/{condition-names-style-development => condition-names-style-mode}/package.json (65%) create mode 100644 test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json create mode 100644 test/configCases/css/css-import/node_modules/condition-names-webpack-js/webpack.js create mode 100644 test/configCases/css/css-import/node_modules/condition-names-webpack/package.json create mode 100644 test/configCases/css/css-import/node_modules/condition-names-webpack/webpack.css create mode 100644 test/configCases/css/css-import/node_modules/style-and-main-library/main.css create mode 100644 test/configCases/css/css-import/node_modules/style-and-main-library/package.json create mode 100644 test/configCases/css/css-import/node_modules/style-and-main-library/styles.css diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 62c3b269917..f97381ded4d 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -1479,18 +1479,19 @@ const getResolveDefaults = ({ }; if (css) { - const cssExtensions = [".css"]; const styleConditions = []; + styleConditions.push("webpack"); styleConditions.push(mode === "development" ? "development" : "production"); styleConditions.push("style"); /** @type {function(): ResolveOptions} */ const styleDeps = () => ({ - mainFields: ["style", "..."], + // We avoid using any files because we don't have a spec for that mainFiles: [], + mainFields: ["style", "..."], conditionNames: styleConditions, - extensions: [...cssExtensions] + extensions: [".css"] }); resolveOptions.byDependency["css-import"] = { diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-development/default.css b/test/configCases/css/css-import/node_modules/condition-names-style-mode/default.css similarity index 100% rename from test/configCases/css/css-import/node_modules/condition-names-style-development/default.css rename to test/configCases/css/css-import/node_modules/condition-names-style-mode/default.css diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-development/development.css b/test/configCases/css/css-import/node_modules/condition-names-style-mode/mode.css similarity index 50% rename from test/configCases/css/css-import/node_modules/condition-names-style-development/development.css rename to test/configCases/css/css-import/node_modules/condition-names-style-mode/mode.css index 6e9ee762813..300f0091cfc 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-style-development/development.css +++ b/test/configCases/css/css-import/node_modules/condition-names-style-mode/mode.css @@ -1,3 +1,3 @@ -.development { +.mode { color: red; } diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-development/package.json b/test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json similarity index 65% rename from test/configCases/css/css-import/node_modules/condition-names-style-development/package.json rename to test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json index 7056c7f4fd3..619e7449daa 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-style-development/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json @@ -2,7 +2,8 @@ "name": "condition-names-style-development", "exports": { "style": { - "development": "development.css", + "production": "mode.css", + "development": "mode.css", "default": "./default.css" } } diff --git a/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json b/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json new file mode 100644 index 00000000000..3459cfc2c0e --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json @@ -0,0 +1,8 @@ +{ + "name": "condition-names-webpack", + "exports": { + "webpack": { + "default": "./webpack.js" + } + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-webpack-js/webpack.js b/test/configCases/css/css-import/node_modules/condition-names-webpack-js/webpack.js new file mode 100644 index 00000000000..bc0fdf485a6 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-webpack-js/webpack.js @@ -0,0 +1 @@ +export default "webpack"; diff --git a/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json b/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json new file mode 100644 index 00000000000..865bbd8f591 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json @@ -0,0 +1,8 @@ +{ + "name": "condition-names-webpack", + "exports": { + "webpack": { + "default": "./webpack.css" + } + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-webpack/webpack.css b/test/configCases/css/css-import/node_modules/condition-names-webpack/webpack.css new file mode 100644 index 00000000000..44867d273a4 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-webpack/webpack.css @@ -0,0 +1,3 @@ +.webpack { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/style-and-main-library/main.css b/test/configCases/css/css-import/node_modules/style-and-main-library/main.css new file mode 100644 index 00000000000..864a5060ae2 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-and-main-library/main.css @@ -0,0 +1,3 @@ +.main { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/style-and-main-library/package.json b/test/configCases/css/css-import/node_modules/style-and-main-library/package.json new file mode 100644 index 00000000000..f0dab2e32cb --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-and-main-library/package.json @@ -0,0 +1,4 @@ +{ + "name": "style-and-main-library", + "style": "./styles.css" +} diff --git a/test/configCases/css/css-import/node_modules/style-and-main-library/styles.css b/test/configCases/css/css-import/node_modules/style-and-main-library/styles.css new file mode 100644 index 00000000000..b5795b7efc5 --- /dev/null +++ b/test/configCases/css/css-import/node_modules/style-and-main-library/styles.css @@ -0,0 +1,3 @@ +.style { + color: steelblue; +} diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index a8f6eff96cf..cc657415099 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -9,10 +9,13 @@ @import "./with-less-import.css"; @import "prefer-relative.css"; @import "condition-names-style"; -@import "condition-names-style-development"; +@import "condition-names-style-mode"; @import "condition-names-subpath/custom.css"; /* Not valid */ @import "condition-names-subpath/non-valid.css"; @import "condition-names-subpath-extra/custom.css"; @import "condition-names-style-less"; @import "condition-names-custom-name"; +@import "style-and-main-library"; +/* Not valid */ +@import "condition-names-webpack"; From e1de2dceb4d032b8fdbbd911719ee4fd7ca0aa6e Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 20:32:09 +0300 Subject: [PATCH 23/29] test: update snapshots --- .../ConfigCacheTestCases.longtest.js.snap | 48 +- .../ConfigTestCases.basictest.js.snap | 1026 ++++++++++++++++- 2 files changed, 1071 insertions(+), 3 deletions(-) diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index 504a1ada9a0..40cc3114c31 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -33,6 +33,52 @@ p { .custom-extension{ color: green; }.using-loader { color: red; } +.link { + color: #428bca; +} + +.foo { + color: red; +} + +.relative { + color: red; +} + +.default { + color: steelblue; +} + +.mode { + color: red; +} + +.dist { + color: steelblue; +} + +.dist { + color: steelblue; +} + +.conditional-names { + color: #428bca; +} + +.custom-name { + color: steelblue; +} + +.style { + color: steelblue; +} + +.webpack { + color: steelblue; +} + +/* Not valid */ +/* Not valid */ body { background: black; @@ -1192,7 +1238,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-mode\\\\/mode\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/node_modules\\\\/style-and-main-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-webpack\\\\/webpack\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 91103e8349f..ebfcdea067c 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -1,5 +1,82 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`ConfigCacheTestCases custom-modules json-custom exported tests should transform toml to json 1`] = ` +Object { + "owner": Object { + "bio": "GitHub Cofounder & CEO +Likes tater tots and beer.", + "dob": "1979-05-27T07:32:00.000Z", + "name": "Tom Preston-Werner", + "organization": "GitHub", + }, + "title": "TOML Example", +} +`; + +exports[`ConfigCacheTestCases records issue-2991 exported tests should write relative paths to records 1`] = ` +"{ + \\"chunks\\": { + \\"byName\\": { + \\"main\\": 179 + }, + \\"bySource\\": { + \\"0 main\\": 179 + }, + \\"usedIds\\": [ + 179 + ] + }, + \\"modules\\": { + \\"byIdentifier\\": { + \\"./test.js\\": 393, + \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, + \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17, + \\"ignored|./.|pkgs/somepackage/foo\\": 802 + }, + \\"usedIds\\": [ + 17, + 147, + 393, + 802 + ] + } +}" +`; + +exports[`ConfigCacheTestCases records issue-7339 exported tests should write relative dynamic-require paths to records 1`] = ` +"{ + \\"chunks\\": { + \\"byName\\": { + \\"main\\": 179 + }, + \\"bySource\\": { + \\"0 main\\": 179 + }, + \\"usedIds\\": [ + 179 + ] + }, + \\"modules\\": { + \\"byIdentifier\\": { + \\"./dependencies/bar.js\\": 379, + \\"./dependencies/foo.js\\": 117, + \\"./dependencies|sync|/^\\\\\\\\.\\\\\\\\/.*$/\\": 412, + \\"./test.js\\": 393, + \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, + \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17 + }, + \\"usedIds\\": [ + 17, + 117, + 147, + 379, + 393, + 412 + ] + } +}" +`; + exports[`ConfigTestCases css css-import exported tests should compile 1`] = ` Array [ "body { @@ -49,7 +126,7 @@ p { color: steelblue; } -.development { +.mode { color: red; } @@ -69,6 +146,15 @@ p { color: steelblue; } +.style { + color: steelblue; +} + +.webpack { + color: steelblue; +} + +/* Not valid */ /* Not valid */ body { @@ -1229,6 +1315,942 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-development\\\\/development\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-mode\\\\/mode\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/node_modules\\\\/style-and-main-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-webpack\\\\/webpack\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; + +exports[`ConfigTestCases css pure-css exported tests should compile 1`] = ` +Array [ + ".class { + color: red; +} + +.local1, +.local2 :global .global, +.local3 { + color: green; +} + +:global .global :local .local4 { + color: yellow; +} + +.local5:global(.global).local6 { + color: blue; +} + +.local7 div:not(.disabled, .mButtonDisabled, .tipOnly) { + pointer-events: initial !important; +} + +.local8 :is(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local9 :matches(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local10 :where(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local11 div:has(.disabled, .mButtonDisabled, .tipOnly) { + pointer-events: initial !important; +} + +.local12 div:current(p, span) { + background-color: yellow; +} + +.local13 div:past(p, span) { + display: none; +} + +.local14 div:future(p, span) { + background-color: yellow; +} + +.local15 div:-moz-any(ol, ul, menu, dir) { + list-style-type: square; +} + +.local16 li:-webkit-any(:first-child, :last-child) { + background-color: aquamarine; +} + +.local9 :matches(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +:global(:global(:local(.nested1)).nested2).nested3 { + color: pink; +} + +#ident { + color: purple; +} + +@keyframes localkeyframes { + 0% { + left: var(--pos1x); + top: var(--pos1y); + color: var(--theme-color1); + } + 100% { + left: var(--pos2x); + top: var(--pos2y); + color: var(--theme-color2); + } +} + +@keyframes localkeyframes2 { + 0% { + left: 0; + } + 100% { + left: 100px; + } +} + +.animation { + animation-name: localkeyframes; + animation: 3s ease-in 1s 2 reverse both paused localkeyframes, localkeyframes2; + --pos1x: 0px; + --pos1y: 0px; + --pos2x: 10px; + --pos2y: 20px; +} + +/* .composed { + composes: local1; + composes: local2; +} */ + +.vars { + color: var(--local-color); + --local-color: red; +} + +.globalVars :global { + color: var(--global-color); + --global-color: red; +} + +@media (min-width: 1600px) { + .wideScreenClass { + color: var(--local-color); + --local-color: green; + } +} + +@media screen and (max-width: 600px) { + .narrowScreenClass { + color: var(--local-color); + --local-color: purple; + } +} + +@supports (display: grid) { + .displayGridInSupports { + display: grid; + } +} + +@supports not (display: grid) { + .floatRightInNegativeSupports { + float: right; + } +} + +@supports (display: flex) { + @media screen and (min-width: 900px) { + .displayFlexInMediaInSupports { + display: flex; + } + } +} + +@media screen and (min-width: 900px) { + @supports (display: flex) { + .displayFlexInSupportsInMedia { + display: flex; + } + } +} + +@MEDIA screen and (min-width: 900px) { + @SUPPORTS (display: flex) { + .displayFlexInSupportsInMediaUpperCase { + display: flex; + } + } +} + +.animationUpperCase { + ANIMATION-NAME: localkeyframesUPPERCASE; + ANIMATION: 3s ease-in 1s 2 reverse both paused localkeyframesUPPERCASE, localkeyframes2UPPPERCASE; + --pos1x: 0px; + --pos1y: 0px; + --pos2x: 10px; + --pos2y: 20px; +} + +@KEYFRAMES localkeyframesUPPERCASE { + 0% { + left: VAR(--pos1x); + top: VAR(--pos1y); + color: VAR(--theme-color1); + } + 100% { + left: VAR(--pos2x); + top: VAR(--pos2y); + color: VAR(--theme-color2); + } +} + +@KEYframes localkeyframes2UPPPERCASE { + 0% { + left: 0; + } + 100% { + left: 100px; + } +} + +:GLOBAL .globalUpperCase :LOCAL .localUpperCase { + color: yellow; +} + +.VARS { + color: VAR(--LOCAL-COLOR); + --LOCAL-COLOR: red; +} + +.globalVarsUpperCase :GLOBAL { + COLOR: VAR(--GLOBAR-COLOR); + --GLOBAR-COLOR: red; +} + +@supports (top: env(safe-area-inset-top, 0)) { + .inSupportScope { + color: red; + } +} + +.a { + animation: 3s animationName; + -webkit-animation: 3s animationName; +} + +.b { + animation: animationName 3s; + -webkit-animation: animationName 3s; +} + +.c { + animation-name: animationName; + -webkit-animation-name: animationName; +} + +.d { + --animation-name: animationName; +} + +@keyframes animationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@-webkit-keyframes animationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@-moz-keyframes mozAnimationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@counter-style thumbs { + system: cyclic; + symbols: \\"\\\\1F44D\\"; + suffix: \\" \\"; +} + +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} + +/* At-rule for \\"nice-style\\" in Font Two */ +@font-feature-values Font Two { + @styleset { + nice-style: 4; + } +} + +@property --my-color { + syntax: \\"\\"; + inherits: false; + initial-value: #c0ffee; +} + +.class { + color: var(--my-color); +} + +@layer utilities { + .padding-sm { + padding: 0.5rem; + } + + .padding-lg { + padding: 0.8rem; + } +} + +.class { + color: red; + + .nested-pure { + color: red; + } + + @media screen and (min-width: 200px) { + color: blue; + + .nested-media { + color: blue; + } + } + + @supports (display: flex) { + display: flex; + + .nested-supports { + display: flex; + } + } + + @layer foo { + background: red; + + .nested-layer { + background: red; + } + } + + @container foo { + background: red; + + .nested-layer { + background: red; + } + } +} + +.not-selector-inside { + color: #fff; + opacity: 0.12; + padding: .5px; + unknown: :local(.test); + unknown1: :local .test; + unknown2: :global .test; + unknown3: :global .test; + unknown4: .foo, .bar, #bar; +} + +@unknown :local .local :global .global { + color: red; +} + +@unknown :local(.local) :global(.global) { + color: red; +} + +.nested-var { + .again { + color: var(--local-color); + } +} + +.nested-with-local-pseudo { + color: red; + + :local .local-nested { + color: red; + } + + :global .global-nested { + color: red; + } + + :local(.local-nested) { + color: red; + } + + :global(.global-nested) { + color: red; + } + + :local .local-nested, :global .global-nested-next { + color: red; + } + + :local(.local-nested), :global(.global-nested-next) { + color: red; + } + + :global .foo, .bar { + color: red; + } +} + +#id-foo { + color: red; + + #id-bar { + color: red; + } +} + +.nested-parens { + .local9 div:has(.vertical-tiny, .vertical-small) { + max-height: 0; + margin: 0; + overflow: hidden; + } +} + +:global .global-foo { + .nested-global { + color: red; + } + + :local .local-in-global { + color: blue; + } +} + +@unknown .class { + color: red; + + .class { + color: red; + } +} + +:global .class :local .in-local-global-scope, +:global .class :local .in-local-global-scope, +:local .class-local-scope :global .in-local-global-scope { + color: red; +} + +@container (width > 400px) { + .class-in-container { + font-size: 1.5em; + } +} + +@container summary (min-width: 400px) { + @container (width > 400px) { + .deep-class-in-container { + font-size: 1.5em; + } + } +} + +:scope { + color: red; +} + +.placeholder-gray-700:-ms-input-placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} +.placeholder-gray-700::-ms-input-placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} +.placeholder-gray-700::placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} + +:root { + --test: dark; +} + +@media screen and (prefers-color-scheme: var(--test)) { + .baz { + color: white; + } +} + +@keyframes slidein { + from { + margin-left: 100%; + width: 300%; + } + + to { + margin-left: 0%; + width: 100%; + } +} + +.class { + animation: + foo var(--animation-name) 3s, + var(--animation-name) 3s, + 3s linear 1s infinite running slidein, + 3s linear env(foo, var(--baz)) infinite running slidein; +} + +:root { + --baz: 10px; +} + +.class { + bar: env(foo, var(--baz)); +} + +:global .global-foo, :local .bar { + :local .local-in-global { + color: blue; + } + + @media screen { + :global .my-global-class-again, + :local .my-global-class-again { + color: red; + } + } +} + +.first-nested { + .first-nested-nested { + color: red; + } +} + +.first-nested-at-rule { + @media screen { + .first-nested-nested-at-rule-deep { + color: red; + } + } +} + +:global .again-global { + color:red; +} + +:global .again-again-global { + :global .again-again-global { + color: red; + } +} + +:root { + --foo: red; +} + +:global .again-again-global { + color: var(--foo); + + :global .again-again-global { + color: var(--foo); + } +} + +:global .again-again-global { + animation: slidein 3s; + + :global .again-again-global, .class, :global(:global(:local(.nested1)).nested2).nested3 { + animation: slidein 3s; + } + + .local2 :global .global, + .local3 { + color: red; + } +} + +@unknown var(--foo) { + color: red; +} + +.class { + .class { + .class { + .class {} + } + } +} + +.class { + .class { + .class { + .class { + animation: slidein 3s; + } + } + } +} + +.class { + animation: slidein 3s; + .class { + animation: slidein 3s; + .class { + animation: slidein 3s; + .class { + animation: slidein 3s; + } + } + } +} + +.class { + color: red; + background: var(--color); +} + +@keyframes test { + 0% { + color: red; + } + 100% { + color: blue; + } +} + +:local(.class) { + color: red; +} + +:local .class { + color: green; +} + +:global(.class) { + color: blue; +} + +:global .class { + color: white; +} + +:export { + foo: bar; +} + +.class { + animation: test 1s, test; +} + +head{--webpack-main:\\\\.\\\\.\\\\/css-modules\\\\/style\\\\.module\\\\.css,\\\\.\\\\/style\\\\.css;}", +] +`; + +exports[`ConfigTestCases css urls exported tests should be able to handle styles in div.css 1`] = ` +Object { + "--foo": " url(img.09a1a1112c577c279435.png)", + "--foo-bar": " \\"http://www.example.com/pinkish.gif\\"", + "/* TODO fix me */ + /*a146": " url('./img.png', 'foo', './img.png', url('./img.png'));*/ + /*a147: image-set(url('./img.png', 'foo', './img.png', url('./img.png')) 1x, url(\\"./img2x.png\\") 2x);*/ +", + "a": " url(img.09a1a1112c577c279435.png)", + "a1": " url(img.09a1a1112c577c279435.png)", + "a10": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", + "a100": " url(img\\\\)img.09a1a1112c577c279435.png)", + "a101": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a102": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a103": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a104": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a105": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a106": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a107": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", + "a108": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a109": " url(img\\\\'img.09a1a1112c577c279435.png)", + "a11": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", + "a110": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a111": " url(img\\\\)img.09a1a1112c577c279435.png)", + "a112": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a113": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", + "a114": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a115": " url(img\\\\'img.09a1a1112c577c279435.png)", + "a116": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a117": " url(img\\\\)img.09a1a1112c577c279435.png)", + "a118": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a119": " url(img.09a1a1112c577c279435.png)", + "a12": " green url(img.09a1a1112c577c279435.png) xyz", + "a120": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", + "a121": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a122": " url(img\\\\'img.09a1a1112c577c279435.png)", + "a123": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a124": " url(img\\\\)img.09a1a1112c577c279435.png)", + "a125": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a126": " url(img.09a1a1112c577c279435.png)", + "a127": " url(img.09a1a1112c577c279435.png)", + "a128": " url(img\\\\'img.09a1a1112c577c279435.png)", + "a129": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a13": " green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz", + "a130": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a131": " url(img.09a1a1112c577c279435.png)", + "a132": " url(img.09a1a1112c577c279435.png)", + "a133": " url(img.09a1a1112c577c279435.png?foo=bar)", + "a134": " url(img.09a1a1112c577c279435.png?foo=bar)", + "a135": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", + "a136": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", + "a137": " url(img.09a1a1112c577c279435.png?foo=bar)", + "a138": " url(img.09a1a1112c577c279435.png?bar=foo)", + "a139": " url(img.09a1a1112c577c279435.png?foo=bar#foo)", + "a14": " url(\\"data:image/svg+xml;charset=utf-8,\\")", + "a140": " url(img.09a1a1112c577c279435.png?bar=foo#bar)", + "a141": " url(img.09a1a1112c577c279435.png?foo=1&bar=2)", + "a142": " url(img.09a1a1112c577c279435.png?foo=2&bar=1)", + "a143": " url(data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20width%3D%22191px%22%20height%3D%22191px%22%20viewBox%3D%220%200%20191%20191%22%20enable-background%3D%22new%200%200%20191%20191%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M95.5%2C0C42.8%2C0%2C0%2C42.8%2C0%2C95.5S42.8%2C191%2C95.5%2C191S191%2C148.2%2C191%2C95.5S148.2%2C0%2C95.5%2C0z%20M95.5%2C187.6%0A%09c-50.848%2C0-92.1-41.25-92.1-92.1c0-50.848%2C41.252-92.1%2C92.1-92.1c50.85%2C0%2C92.1%2C41.252%2C92.1%2C92.1%0A%09C187.6%2C146.35%2C146.35%2C187.6%2C95.5%2C187.6z%22%2F%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M92.9%2C10v8.6H91v-6.5c-0.1%2C0.1-0.2%2C0.2-0.4%2C0.3c-0.2%2C0.1-0.3%2C0.2-0.4%2C0.2c-0.1%2C0-0.3%2C0.1-0.5%2C0.2%0A%09%09c-0.2%2C0.1-0.3%2C0.1-0.5%2C0.1v-1.6c0.5-0.1%2C0.9-0.3%2C1.4-0.5c0.5-0.2%2C0.8-0.5%2C1.2-0.7h1.1V10z%22%2F%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M97.1%2C17.1h3.602v1.5h-5.6V18c0-0.4%2C0.1-0.8%2C0.2-1.2c0.1-0.4%2C0.3-0.6%2C0.5-0.9c0.2-0.3%2C0.5-0.5%2C0.7-0.7%0A%09%09c0.2-0.2%2C0.5-0.4%2C0.7-0.6c0.199-0.2%2C0.5-0.3%2C0.6-0.5c0.102-0.2%2C0.301-0.3%2C0.5-0.5c0.2-0.2%2C0.2-0.3%2C0.301-0.5%0A%09%09c0.101-0.2%2C0.101-0.3%2C0.101-0.5c0-0.4-0.101-0.6-0.3-0.8c-0.2-0.2-0.4-0.3-0.801-0.3c-0.699%2C0-1.399%2C0.3-2.101%2C0.9v-1.6%0A%09%09c0.7-0.5%2C1.5-0.7%2C2.5-0.7c0.399%2C0%2C0.8%2C0.1%2C1.101%2C0.2c0.301%2C0.1%2C0.601%2C0.3%2C0.899%2C0.5c0.3%2C0.2%2C0.399%2C0.5%2C0.5%2C0.8%0A%09%09c0.101%2C0.3%2C0.2%2C0.6%2C0.2%2C1s-0.102%2C0.7-0.2%2C1c-0.099%2C0.3-0.3%2C0.6-0.5%2C0.8c-0.2%2C0.2-0.399%2C0.5-0.7%2C0.7c-0.3%2C0.2-0.5%2C0.4-0.8%2C0.6%0A%09%09c-0.2%2C0.1-0.399%2C0.3-0.5%2C0.4s-0.3%2C0.3-0.5%2C0.4s-0.2%2C0.3-0.3%2C0.4C97.1%2C17%2C97.1%2C17%2C97.1%2C17.1z%22%2F%3E%0A%3C%2Fg%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M15%2C95.4c0%2C0.7-0.1%2C1.4-0.2%2C2c-0.1%2C0.6-0.4%2C1.1-0.7%2C1.5C13.8%2C99.3%2C13.4%2C99.6%2C12.9%2C99.8s-1%2C0.3-1.5%2C0.3%0A%09%09c-0.7%2C0-1.3-0.1-1.8-0.3v-1.5c0.4%2C0.3%2C1%2C0.4%2C1.6%2C0.4c0.6%2C0%2C1.1-0.2%2C1.5-0.7c0.4-0.5%2C0.5-1.1%2C0.5-1.9l0%2C0%0A%09%09C12.8%2C96.7%2C12.3%2C96.9%2C11.5%2C96.9c-0.3%2C0-0.7-0.102-1-0.2c-0.3-0.101-0.5-0.3-0.8-0.5c-0.3-0.2-0.4-0.5-0.5-0.8%0A%09%09c-0.1-0.3-0.2-0.7-0.2-1c0-0.4%2C0.1-0.8%2C0.2-1.2c0.1-0.4%2C0.3-0.7%2C0.6-0.9c0.3-0.2%2C0.6-0.5%2C0.9-0.6c0.3-0.1%2C0.8-0.2%2C1.2-0.2%0A%09%09c0.5%2C0%2C0.9%2C0.1%2C1.2%2C0.3c0.3%2C0.2%2C0.7%2C0.4%2C0.9%2C0.8s0.5%2C0.7%2C0.6%2C1.2S15%2C94.8%2C15%2C95.4z%20M13.1%2C94.4c0-0.2%2C0-0.4-0.1-0.6%0A%09%09c-0.1-0.2-0.1-0.4-0.2-0.5c-0.1-0.1-0.2-0.2-0.4-0.3c-0.2-0.1-0.3-0.1-0.5-0.1c-0.2%2C0-0.3%2C0-0.4%2C0.1s-0.3%2C0.2-0.3%2C0.3%0A%09%09c0%2C0.1-0.2%2C0.3-0.2%2C0.4c0%2C0.1-0.1%2C0.4-0.1%2C0.6c0%2C0.2%2C0%2C0.4%2C0.1%2C0.6c0.1%2C0.2%2C0.1%2C0.3%2C0.2%2C0.4c0.1%2C0.1%2C0.2%2C0.2%2C0.4%2C0.3%0A%09%09c0.2%2C0.1%2C0.3%2C0.1%2C0.5%2C0.1c0.2%2C0%2C0.3%2C0%2C0.4-0.1s0.2-0.2%2C0.3-0.3c0.1-0.1%2C0.2-0.2%2C0.2-0.4C13%2C94.7%2C13.1%2C94.6%2C13.1%2C94.4z%22%2F%3E%0A%3C%2Fg%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M176%2C99.7V98.1c0.6%2C0.4%2C1.2%2C0.602%2C2%2C0.602c0.5%2C0%2C0.8-0.102%2C1.1-0.301c0.301-0.199%2C0.4-0.5%2C0.4-0.801%0A%09%09c0-0.398-0.2-0.699-0.5-0.898c-0.3-0.2-0.8-0.301-1.3-0.301h-0.802V95h0.701c1.101%2C0%2C1.601-0.4%2C1.601-1.1c0-0.7-0.4-1-1.302-1%0A%09%09c-0.6%2C0-1.1%2C0.2-1.6%2C0.5v-1.5c0.6-0.3%2C1.301-0.4%2C2.1-0.4c0.9%2C0%2C1.5%2C0.2%2C2%2C0.6s0.701%2C0.9%2C0.701%2C1.5c0%2C1.1-0.601%2C1.8-1.701%2C2.1l0%2C0%0A%09%09c0.602%2C0.1%2C1.102%2C0.3%2C1.4%2C0.6s0.5%2C0.8%2C0.5%2C1.3c0%2C0.801-0.3%2C1.4-0.9%2C1.9c-0.6%2C0.5-1.398%2C0.7-2.398%2C0.7%0A%09%09C177.2%2C100.1%2C176.5%2C100%2C176%2C99.7z%22%2F%3E%0A%3C%2Fg%3E%0A%3Cg%3E%0A%09%3Cpath%20fill%3D%22%23636363%22%20d%3D%22M98.5%2C179.102c0%2C0.398-0.1%2C0.799-0.2%2C1.199C98.2%2C180.7%2C98%2C181%2C97.7%2C181.2s-0.601%2C0.5-0.9%2C0.601%0A%09%09c-0.3%2C0.1-0.7%2C0.199-1.2%2C0.199c-0.5%2C0-0.9-0.1-1.3-0.3c-0.4-0.2-0.7-0.399-0.9-0.8c-0.2-0.4-0.5-0.7-0.6-1.2%0A%09%09c-0.1-0.5-0.2-1-0.2-1.601c0-0.699%2C0.1-1.399%2C0.3-2c0.2-0.601%2C0.4-1.101%2C0.8-1.5c0.4-0.399%2C0.7-0.699%2C1.2-1c0.5-0.3%2C1-0.3%2C1.6-0.3%0A%09%09c0.6%2C0%2C1.2%2C0.101%2C1.5%2C0.199v1.5c-0.4-0.199-0.9-0.399-1.4-0.399c-0.3%2C0-0.6%2C0.101-0.8%2C0.2c-0.2%2C0.101-0.5%2C0.3-0.7%2C0.5%0A%09%09c-0.2%2C0.199-0.3%2C0.5-0.4%2C0.8c-0.1%2C0.301-0.2%2C0.7-0.2%2C1.101l0%2C0c0.4-0.601%2C1-0.8%2C1.8-0.8c0.3%2C0%2C0.7%2C0.1%2C0.9%2C0.199%0A%09%09c0.2%2C0.101%2C0.5%2C0.301%2C0.7%2C0.5c0.199%2C0.2%2C0.398%2C0.5%2C0.5%2C0.801C98.5%2C178.2%2C98.5%2C178.7%2C98.5%2C179.102z%20M96.7%2C179.2%0A%09%09c0-0.899-0.4-1.399-1.1-1.399c-0.2%2C0-0.3%2C0-0.5%2C0.1c-0.2%2C0.101-0.3%2C0.201-0.4%2C0.301c-0.1%2C0.101-0.2%2C0.199-0.2%2C0.4%0A%09%09c0%2C0.199-0.1%2C0.299-0.1%2C0.5c0%2C0.199%2C0%2C0.398%2C0.1%2C0.6s0.1%2C0.3%2C0.2%2C0.5c0.1%2C0.199%2C0.2%2C0.199%2C0.4%2C0.3c0.2%2C0.101%2C0.3%2C0.101%2C0.5%2C0.101%0A%09%09c0.2%2C0%2C0.3%2C0%2C0.5-0.101c0.2-0.101%2C0.301-0.199%2C0.301-0.3c0-0.1%2C0.199-0.301%2C0.199-0.399C96.6%2C179.7%2C96.7%2C179.4%2C96.7%2C179.2z%22%2F%3E%0A%3C%2Fg%3E%0A%3Ccircle%20fill%3D%22%23636363%22%20cx%3D%2295%22%20cy%3D%2295%22%20r%3D%227%22%2F%3E%0A%3C%2Fsvg%3E%0A) 50% 50%/191px no-repeat", + "a144": " url(img.09a1a1112c577c279435.png)", + "a145": " url(img.09a1a1112c577c279435.png)", + "a148": " url('data:image/svg+xml,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Crect width=\\"100%25\\" height=\\"100%25\\" style=\\"stroke: rgb(223,224,225); stroke-width: 2px; fill: none; stroke-dasharray: 6px 3px\\" /%3E%3C/svg%3E')", + "a149": " url('data:image/svg+xml,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Crect width=\\"100%25\\" height=\\"100%25\\" style=\\"stroke: rgb(223,224,225); stroke-width: 2px; fill: none; stroke-dasharray: 6px 3px\\" /%3E%3C/svg%3E')", + "a15": " url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E)", + "a150": " url('data:image/svg+xml,%3Csvg xmlns=\\"http://www.w3.org/2000/svg\\"%3E%3Crect width=\\"100%25\\" height=\\"100%25\\" style=\\"stroke: rgb(223,224,225); stroke-width: 2px; fill: none; stroke-dasharray: 6px 3px\\" /%3E%3C/svg%3E')", + "a151": " url('data:image/svg+xml;utf8,')", + "a152": " url(img.09a1a1112c577c279435.png)", + "a153": " url(img.09a1a1112c577c279435.png)", + "a154": " url(other.09a1a1112c577c279435.png)", + "a155": " url(img.09a1a1112c577c279435.png)", + "a156": " url(\\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e\\")", + "a157": " url('data:image/svg+xml;utf8,')", + "a158": " src(\\"http://www.example.com/pinkish.gif\\")", + "a159": " src(var(--foo))", + "a16": " url('data:image/svg+xml;charset=utf-8,#filter')", + "a160": " url(img.09a1a1112c577c279435.png param(--color var(--primary-color)))", + "a161": " src(\\"img.png\\" param(--color var(--primary-color)))", + "a162": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a163": " url(img.09a1a1112c577c279435.png)", + "a164": " url( img.png bug)", + "a165": " url(imgn.09a1a1112c577c279435.png)", + "a166": " url('data:image/svg+xml;utf8,')", + "a167": " url(http://example.com/image.jpg)", + "a168": " url(http://example.com/image.jpg)", + "a169": " url(data:,)", + "a17": " url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter\\")", + "a170": " url(data:,)", + "a171": " image(ltr 'img.png#xywh=0,0,16,16', red)", + "a172": " image-set( + linear-gradient(blue, white) 1x, + linear-gradient(blue, green) 2x + )", + "a173": " image-set( + url(img.09a1a1112c577c279435.png) type(\\"image/png\\"), + url(img.09a1a1112c577c279435.png) type(\\"image/png\\") + )", + "a174": " image-set( + url(img.09a1a1112c577c279435.png) 1x, + url(img.09a1a1112c577c279435.png) 2x + )", + "a175": " image-set( + url(img.09a1a1112c577c279435.png) 1x, + url(img.09a1a1112c577c279435.png) 2x, + url(img.09a1a1112c577c279435.png) 3x + )", + "a176": " image-set( + url(img.09a1a1112c577c279435.png) type(\\"image/png\\"), + url(img.09a1a1112c577c279435.png) type(\\"image/png\\") + ) \\"img.png\\"", + "a177": " image-set( + url(img.09a1a1112c577c279435.png) 1x type(\\"image/png\\"), + url(img.09a1a1112c577c279435.png) 2x type(\\"image/png\\") + )", + "a178": " image-set( + url(img.09a1a1112c577c279435.png) type(\\"image/png\\") 1x, + url(img.09a1a1112c577c279435.png) type(\\"image/png\\") 2x + )", + "a179": " -webkit-image-set( + url(img.09a1a1112c577c279435.png) 1x + )", + "a18": " url(#highlight)", + "a180": " -webkit-image-set( + url(img.09a1a1112c577c279435.png var(--foo, \\"test.png\\")) 1x + )", + "a181": " src( \\"img.png\\" )", + "a182": " src('img.png')", + "a183": " src('img.png' var(--foo, \\"test.png\\"))", + "a184": " src(var(--foo, \\"test.png\\"))", + "a185": " src(\\" img.png \\")", + "a186": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", + "a187": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", + "a188": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", + "a189": " image-set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", + "a19": " url(#line-marker)", + "a190": " image-set(url(img.09a1a1112c577c279435.png)1x)", + "a191": " image-set(url(img.09a1a1112c577c279435.png)1x/* test*/,/* test*/url(img.09a1a1112c577c279435.png)2x)", + "a197": " \\\\u\\\\r\\\\l(img.09a1a1112c577c279435.png)", + "a198": " \\\\image-\\\\set(url(img.09a1a1112c577c279435.png)1x,url(img.09a1a1112c577c279435.png)2x,url(img.09a1a1112c577c279435.png)3x)", + "a199": " \\\\-webk\\\\it-image-set(url(img.09a1a1112c577c279435.png)1x)", + "a2": " url(img.09a1a1112c577c279435.png)", + "a200": "-webkit-image-set(url(img.09a1a1112c577c279435.png)1x)", + "a22": " \\"do not use url(path)\\"", + "a23": " 'do not \\"use\\" url(path)'", + "a24": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x) +", + "a25": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x) +", + "a26": " green url() xyz", + "a27": " green url('') xyz", + "a28": " green url(\\"\\") xyz", + "a29": " green url(' ') xyz", + "a3": " url(img.09a1a1112c577c279435.png)", + "a30": " green url( + ) xyz", + "a4": " url(img.09a1a1112c577c279435.png#hash)", + "a40": " green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz", + "a41": " green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz", + "a42": " url(img.09a1a1112c577c279435.png?foo)", + "a43": " url(img.09a1a1112c577c279435.png?foo=bar)", + "a44": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", + "a45": " url(img.09a1a1112c577c279435.png?foo=bar#hash)", + "a46": " url(img.09a1a1112c577c279435.png?)", + "a47": " url(img.09a1a1112c577c279435.png) url(\\"data:image/svg+xml;charset=utf-8,\\") url(img.09a1a1112c577c279435.png)", + "a48": " __URL__()", + "a49": " url(img-simple.09a1a1112c577c279435.png)", + "a5": " url( + img.09a1a1112c577c279435.png + )", + "a50": " url(img-simple.09a1a1112c577c279435.png)", + "a51": " url(img-simple.09a1a1112c577c279435.png)", + "a52": " url(img.09a1a1112c577c279435.png)", + "a53": " url(img.09a1a1112c577c279435.png)", + "a55": " -webkit-image-set()", + "a56": " image-set()", + "a58": " image-set('')", + "a59": " image-set(\\"\\")", + "a6": " green url( img.09a1a1112c577c279435.png ) xyz", + "a60": " image-set(\\"\\" 1x)", + "a61": " image-set(url())", + "a62": " image-set( + url() + )", + "a63": " image-set(URL())", + "a64": " image-set(url(''))", + "a65": " image-set(url(\\"\\"))", + "a66": " image-set(url('') 1x)", + "a67": " image-set(1x)", + "a68": " image-set( + 1x + )", + "a69": " image-set(calc(1rem + 1px) 1x)", + "a7": " green url( img.09a1a1112c577c279435.png ) xyz", + "a70": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", + "a71": " image-set(url(img1x.09a1a1112c577c279435.png) 1x)", + "a72": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", + "a73": " image-set(url(img\\\\ img.09a1a1112c577c279435.png) 1x, url(img\\\\ img.09a1a1112c577c279435.png) 2x)", + "a74": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x), + image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", + "a75": " image-set( + url(img1x.09a1a1112c577c279435.png) 1x, + url(img2x.09a1a1112c577c279435.png) 2x, + url(img3x.09a1a1112c577c279435.png) 600dpi + )", + "a76": " image-set(url(img1x.09a1a1112c577c279435.png?foo=bar) 1x)", + "a77": " image-set(url(img1x.09a1a1112c577c279435.png#hash) 1x)", + "a78": " image-set(url(img1x.09a1a1112c577c279435.png?#iefix) 1x)", + "a79": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", + "a8": " green url(img.09a1a1112c577c279435.png) xyz", + "a80": " -webkit-image-set(url(img1x.09a1a1112c577c279435.png) 1x)", + "a81": " -webkit-image-set( + url(img1x.09a1a1112c577c279435.png) 1x + )", + "a82": " image-set(url(img1x.09a1a1112c577c279435.png) 1x)", + "a83": " image-set( + url(img1x.09a1a1112c577c279435.png) 1x + )", + "a84": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", + "a85": " image-set( + url(img1x.09a1a1112c577c279435.png) 1x, + url(img2x.09a1a1112c577c279435.png) 2x, + url(img3x.09a1a1112c577c279435.png) 600dpi + )", + "a86": " image-set(url(img\\\\ img.09a1a1112c577c279435.png) 1x, url(img\\\\ img.09a1a1112c577c279435.png) 2x)", + "a87": " image-set(url(img1x.09a1a1112c577c279435.png) 1x, url(img2x.09a1a1112c577c279435.png) 2x)", + "a88": " url(imgimg.09a1a1112c577c279435.png)", + "a89": " url(img\\\\'img.09a1a1112c577c279435.png)", + "a9": " green url(img.09a1a1112c577c279435.png) url(other-img.09a1a1112c577c279435.png) xyz", + "a90": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", + "a91": " url(img\\\\(img.09a1a1112c577c279435.png)", + "a92": " url(img\\\\)img.09a1a1112c577c279435.png)", + "a93": " url(img\\\\ img.09a1a1112c577c279435.png)", + "a94": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a95": " image-set( + url(imgimg.09a1a1112c577c279435.png) 1x, + url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png) 2x, + url(img\\\\'img.09a1a1112c577c279435.png) 3x, + url(img\\\\(img.09a1a1112c577c279435.png) 4x, + url(img\\\\)img.09a1a1112c577c279435.png) 5x, + url(img\\\\ img.09a1a1112c577c279435.png) 6x, + url(\\"img'() img.09a1a1112c577c279435.png\\") 7x + )", + "a96": " url(img\\\\'\\\\'\\\\'img.09a1a1112c577c279435.png)", + "a97": " url(\\"img'() img.09a1a1112c577c279435.png\\")", + "a98": " url(img\\\\'img.09a1a1112c577c279435.png)", + "a99": " url(img\\\\(img.09a1a1112c577c279435.png)", + "b": " url(img.09a1a1112c577c279435.png)", + "c": " url(img.09a1a1112c577c279435.png)", + "d": " url(img.09a1a1112c577c279435.png#hash)", + "e": " url( + img.09a1a1112c577c279435.png + )", + "f": " green url( img.09a1a1112c577c279435.png ) xyz", + "g": " green url( img.09a1a1112c577c279435.png ) xyz", + "getPropertyValue": [Function], + "h": " green url(img.09a1a1112c577c279435.png) xyz", + "i": " green url(img.09a1a1112c577c279435.png) url(img.09a1a1112c577c279435.png) xyz", + "j": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", + "k": " green url( img\\\\ img.09a1a1112c577c279435.png ) xyz", + "l": " green url(img.09a1a1112c577c279435.png) xyz", + "m": " green url(img.09a1a1112c577c279435.png) xyz", + "n": " green url(img.09a1a1112c577c279435.png) xyz", +} +`; From 6cf449c50fc4883d62f8c187ef236445c6780b68 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 20:57:42 +0300 Subject: [PATCH 24/29] test: update --- .../ConfigTestCases.basictest.js.snap | 154 +++++++++--------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index ebfcdea067c..8e03c8ae188 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -1,82 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ConfigCacheTestCases custom-modules json-custom exported tests should transform toml to json 1`] = ` -Object { - "owner": Object { - "bio": "GitHub Cofounder & CEO -Likes tater tots and beer.", - "dob": "1979-05-27T07:32:00.000Z", - "name": "Tom Preston-Werner", - "organization": "GitHub", - }, - "title": "TOML Example", -} -`; - -exports[`ConfigCacheTestCases records issue-2991 exported tests should write relative paths to records 1`] = ` -"{ - \\"chunks\\": { - \\"byName\\": { - \\"main\\": 179 - }, - \\"bySource\\": { - \\"0 main\\": 179 - }, - \\"usedIds\\": [ - 179 - ] - }, - \\"modules\\": { - \\"byIdentifier\\": { - \\"./test.js\\": 393, - \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, - \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17, - \\"ignored|./.|pkgs/somepackage/foo\\": 802 - }, - \\"usedIds\\": [ - 17, - 147, - 393, - 802 - ] - } -}" -`; - -exports[`ConfigCacheTestCases records issue-7339 exported tests should write relative dynamic-require paths to records 1`] = ` -"{ - \\"chunks\\": { - \\"byName\\": { - \\"main\\": 179 - }, - \\"bySource\\": { - \\"0 main\\": 179 - }, - \\"usedIds\\": [ - 179 - ] - }, - \\"modules\\": { - \\"byIdentifier\\": { - \\"./dependencies/bar.js\\": 379, - \\"./dependencies/foo.js\\": 117, - \\"./dependencies|sync|/^\\\\\\\\.\\\\\\\\/.*$/\\": 412, - \\"./test.js\\": 393, - \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, - \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17 - }, - \\"usedIds\\": [ - 17, - 117, - 147, - 379, - 393, - 412 - ] - } -}" -`; - exports[`ConfigTestCases css css-import exported tests should compile 1`] = ` Array [ "body { @@ -2254,3 +2177,80 @@ Object { "n": " green url(img.09a1a1112c577c279435.png) xyz", } `; + +exports[`ConfigTestCases custom-modules json-custom exported tests should transform toml to json 1`] = ` +Object { + "owner": Object { + "bio": "GitHub Cofounder & CEO +Likes tater tots and beer.", + "dob": "1979-05-27T07:32:00.000Z", + "name": "Tom Preston-Werner", + "organization": "GitHub", + }, + "title": "TOML Example", +} +`; + +exports[`ConfigTestCases records issue-2991 exported tests should write relative paths to records 1`] = ` +"{ + \\"chunks\\": { + \\"byName\\": { + \\"main\\": 179 + }, + \\"bySource\\": { + \\"0 main\\": 179 + }, + \\"usedIds\\": [ + 179 + ] + }, + \\"modules\\": { + \\"byIdentifier\\": { + \\"./test.js\\": 393, + \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, + \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17, + \\"ignored|./.|pkgs/somepackage/foo\\": 802 + }, + \\"usedIds\\": [ + 17, + 147, + 393, + 802 + ] + } +}" +`; + +exports[`ConfigTestCases records issue-7339 exported tests should write relative dynamic-require paths to records 1`] = ` +"{ + \\"chunks\\": { + \\"byName\\": { + \\"main\\": 179 + }, + \\"bySource\\": { + \\"0 main\\": 179 + }, + \\"usedIds\\": [ + 179 + ] + }, + \\"modules\\": { + \\"byIdentifier\\": { + \\"./dependencies/bar.js\\": 379, + \\"./dependencies/foo.js\\": 117, + \\"./dependencies|sync|/^\\\\\\\\.\\\\\\\\/.*$/\\": 412, + \\"./test.js\\": 393, + \\"external node-commonjs \\\\\\"fs\\\\\\"\\": 147, + \\"external node-commonjs \\\\\\"path\\\\\\"\\": 17 + }, + \\"usedIds\\": [ + 17, + 117, + 147, + 379, + 393, + 412 + ] + } +}" +`; From c76418af884374a16fb8cf3b02eb21c48012bc36 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 21:02:49 +0300 Subject: [PATCH 25/29] test: update --- test/Defaults.unittest.js | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 592163d1aa4..9792794de84 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -430,19 +430,6 @@ describe("snapshots", () => { "...", ], }, - "css-import": Object { - "conditionNames": Array [ - "style", - ], - "extensions": Array [ - ".css", - ], - "mainFields": Array [ - "style", - "...", - ], - "mainFiles": Array [], - }, "esm": Object { "aliasFields": Array [ "browser", @@ -2267,14 +2254,14 @@ describe("snapshots", () => { + }, + ], + "test": /\\.css$/i, - + }, - + Object { + @@ ... @@ + "mimetype": "text/css+module", + "resolve": Object { + "fullySpecified": true, + }, + "type": "css/module", - @@ ... @@ + + }, + + Object { + "mimetype": "text/css", + "resolve": Object { + "fullySpecified": true, @@ -2300,6 +2287,23 @@ describe("snapshots", () => { + "hashDigestLength": 16, + "hashFunction": "xxhash64", @@ ... @@ + + "css-import": Object { + + "conditionNames": Array [ + + "webpack", + + "production", + + "style", + + ], + + "extensions": Array [ + + ".css", + + ], + + "mainFields": Array [ + + "style", + + "...", + + ], + + "mainFiles": Array [], + + "preferRelative": true, + + }, + @@ ... @@ - "/node_modules/", + /^(.+?[\\\\/]node_modules[\\\\/])/, `) From 5d1fdf7dd427548df412bc0471f560bea1ed3b78 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 21:43:53 +0300 Subject: [PATCH 26/29] test: more --- .../ConfigCacheTestCases.longtest.js.snap | 682 +----------------- .../ConfigTestCases.basictest.js.snap | 682 +----------------- .../condition-names-custom-name/package.json | 2 +- .../condition-names-style-less/package.json | 2 +- .../condition-names-style-mode/package.json | 2 +- .../condition-names-style-nested/default.css | 3 + .../condition-names-style-nested/package.json | 8 + .../condition-names-style/package.json | 5 +- .../condition-names-webpack-js/package.json | 5 +- .../condition-names-webpack/package.json | 5 +- .../css/css-import/style-import.css | 17 +- 11 files changed, 47 insertions(+), 1366 deletions(-) create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-nested/default.css create mode 100644 test/configCases/css/css-import/node_modules/condition-names-style-nested/package.json diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index 40cc3114c31..11a1cd90dbd 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -77,8 +77,12 @@ p { color: steelblue; } -/* Not valid */ -/* Not valid */ +.default { + color: steelblue; +} + +/* Failed */ + body { background: black; @@ -1238,679 +1242,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-mode\\\\/mode\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/node_modules\\\\/style-and-main-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-webpack\\\\/webpack\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", -] -`; - -exports[`ConfigCacheTestCases css pure-css exported tests should compile 1`] = ` -Array [ - ".class { - color: red; -} - -.local1, -.local2 :global .global, -.local3 { - color: green; -} - -:global .global :local .local4 { - color: yellow; -} - -.local5:global(.global).local6 { - color: blue; -} - -.local7 div:not(.disabled, .mButtonDisabled, .tipOnly) { - pointer-events: initial !important; -} - -.local8 :is(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local9 :matches(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local10 :where(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local11 div:has(.disabled, .mButtonDisabled, .tipOnly) { - pointer-events: initial !important; -} - -.local12 div:current(p, span) { - background-color: yellow; -} - -.local13 div:past(p, span) { - display: none; -} - -.local14 div:future(p, span) { - background-color: yellow; -} - -.local15 div:-moz-any(ol, ul, menu, dir) { - list-style-type: square; -} - -.local16 li:-webkit-any(:first-child, :last-child) { - background-color: aquamarine; -} - -.local9 :matches(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -:global(:global(:local(.nested1)).nested2).nested3 { - color: pink; -} - -#ident { - color: purple; -} - -@keyframes localkeyframes { - 0% { - left: var(--pos1x); - top: var(--pos1y); - color: var(--theme-color1); - } - 100% { - left: var(--pos2x); - top: var(--pos2y); - color: var(--theme-color2); - } -} - -@keyframes localkeyframes2 { - 0% { - left: 0; - } - 100% { - left: 100px; - } -} - -.animation { - animation-name: localkeyframes; - animation: 3s ease-in 1s 2 reverse both paused localkeyframes, localkeyframes2; - --pos1x: 0px; - --pos1y: 0px; - --pos2x: 10px; - --pos2y: 20px; -} - -/* .composed { - composes: local1; - composes: local2; -} */ - -.vars { - color: var(--local-color); - --local-color: red; -} - -.globalVars :global { - color: var(--global-color); - --global-color: red; -} - -@media (min-width: 1600px) { - .wideScreenClass { - color: var(--local-color); - --local-color: green; - } -} - -@media screen and (max-width: 600px) { - .narrowScreenClass { - color: var(--local-color); - --local-color: purple; - } -} - -@supports (display: grid) { - .displayGridInSupports { - display: grid; - } -} - -@supports not (display: grid) { - .floatRightInNegativeSupports { - float: right; - } -} - -@supports (display: flex) { - @media screen and (min-width: 900px) { - .displayFlexInMediaInSupports { - display: flex; - } - } -} - -@media screen and (min-width: 900px) { - @supports (display: flex) { - .displayFlexInSupportsInMedia { - display: flex; - } - } -} - -@MEDIA screen and (min-width: 900px) { - @SUPPORTS (display: flex) { - .displayFlexInSupportsInMediaUpperCase { - display: flex; - } - } -} - -.animationUpperCase { - ANIMATION-NAME: localkeyframesUPPERCASE; - ANIMATION: 3s ease-in 1s 2 reverse both paused localkeyframesUPPERCASE, localkeyframes2UPPPERCASE; - --pos1x: 0px; - --pos1y: 0px; - --pos2x: 10px; - --pos2y: 20px; -} - -@KEYFRAMES localkeyframesUPPERCASE { - 0% { - left: VAR(--pos1x); - top: VAR(--pos1y); - color: VAR(--theme-color1); - } - 100% { - left: VAR(--pos2x); - top: VAR(--pos2y); - color: VAR(--theme-color2); - } -} - -@KEYframes localkeyframes2UPPPERCASE { - 0% { - left: 0; - } - 100% { - left: 100px; - } -} - -:GLOBAL .globalUpperCase :LOCAL .localUpperCase { - color: yellow; -} - -.VARS { - color: VAR(--LOCAL-COLOR); - --LOCAL-COLOR: red; -} - -.globalVarsUpperCase :GLOBAL { - COLOR: VAR(--GLOBAR-COLOR); - --GLOBAR-COLOR: red; -} - -@supports (top: env(safe-area-inset-top, 0)) { - .inSupportScope { - color: red; - } -} - -.a { - animation: 3s animationName; - -webkit-animation: 3s animationName; -} - -.b { - animation: animationName 3s; - -webkit-animation: animationName 3s; -} - -.c { - animation-name: animationName; - -webkit-animation-name: animationName; -} - -.d { - --animation-name: animationName; -} - -@keyframes animationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@-webkit-keyframes animationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@-moz-keyframes mozAnimationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@counter-style thumbs { - system: cyclic; - symbols: \\"\\\\1F44D\\"; - suffix: \\" \\"; -} - -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} - -/* At-rule for \\"nice-style\\" in Font Two */ -@font-feature-values Font Two { - @styleset { - nice-style: 4; - } -} - -@property --my-color { - syntax: \\"\\"; - inherits: false; - initial-value: #c0ffee; -} - -.class { - color: var(--my-color); -} - -@layer utilities { - .padding-sm { - padding: 0.5rem; - } - - .padding-lg { - padding: 0.8rem; - } -} - -.class { - color: red; - - .nested-pure { - color: red; - } - - @media screen and (min-width: 200px) { - color: blue; - - .nested-media { - color: blue; - } - } - - @supports (display: flex) { - display: flex; - - .nested-supports { - display: flex; - } - } - - @layer foo { - background: red; - - .nested-layer { - background: red; - } - } - - @container foo { - background: red; - - .nested-layer { - background: red; - } - } -} - -.not-selector-inside { - color: #fff; - opacity: 0.12; - padding: .5px; - unknown: :local(.test); - unknown1: :local .test; - unknown2: :global .test; - unknown3: :global .test; - unknown4: .foo, .bar, #bar; -} - -@unknown :local .local :global .global { - color: red; -} - -@unknown :local(.local) :global(.global) { - color: red; -} - -.nested-var { - .again { - color: var(--local-color); - } -} - -.nested-with-local-pseudo { - color: red; - - :local .local-nested { - color: red; - } - - :global .global-nested { - color: red; - } - - :local(.local-nested) { - color: red; - } - - :global(.global-nested) { - color: red; - } - - :local .local-nested, :global .global-nested-next { - color: red; - } - - :local(.local-nested), :global(.global-nested-next) { - color: red; - } - - :global .foo, .bar { - color: red; - } -} - -#id-foo { - color: red; - - #id-bar { - color: red; - } -} - -.nested-parens { - .local9 div:has(.vertical-tiny, .vertical-small) { - max-height: 0; - margin: 0; - overflow: hidden; - } -} - -:global .global-foo { - .nested-global { - color: red; - } - - :local .local-in-global { - color: blue; - } -} - -@unknown .class { - color: red; - - .class { - color: red; - } -} - -:global .class :local .in-local-global-scope, -:global .class :local .in-local-global-scope, -:local .class-local-scope :global .in-local-global-scope { - color: red; -} - -@container (width > 400px) { - .class-in-container { - font-size: 1.5em; - } -} - -@container summary (min-width: 400px) { - @container (width > 400px) { - .deep-class-in-container { - font-size: 1.5em; - } - } -} - -:scope { - color: red; -} - -.placeholder-gray-700:-ms-input-placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} -.placeholder-gray-700::-ms-input-placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} -.placeholder-gray-700::placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} - -:root { - --test: dark; -} - -@media screen and (prefers-color-scheme: var(--test)) { - .baz { - color: white; - } -} - -@keyframes slidein { - from { - margin-left: 100%; - width: 300%; - } - - to { - margin-left: 0%; - width: 100%; - } -} - -.class { - animation: - foo var(--animation-name) 3s, - var(--animation-name) 3s, - 3s linear 1s infinite running slidein, - 3s linear env(foo, var(--baz)) infinite running slidein; -} - -:root { - --baz: 10px; -} - -.class { - bar: env(foo, var(--baz)); -} - -:global .global-foo, :local .bar { - :local .local-in-global { - color: blue; - } - - @media screen { - :global .my-global-class-again, - :local .my-global-class-again { - color: red; - } - } -} - -.first-nested { - .first-nested-nested { - color: red; - } -} - -.first-nested-at-rule { - @media screen { - .first-nested-nested-at-rule-deep { - color: red; - } - } -} - -:global .again-global { - color:red; -} - -:global .again-again-global { - :global .again-again-global { - color: red; - } -} - -:root { - --foo: red; -} - -:global .again-again-global { - color: var(--foo); - - :global .again-again-global { - color: var(--foo); - } -} - -:global .again-again-global { - animation: slidein 3s; - - :global .again-again-global, .class, :global(:global(:local(.nested1)).nested2).nested3 { - animation: slidein 3s; - } - - .local2 :global .global, - .local3 { - color: red; - } -} - -@unknown var(--foo) { - color: red; -} - -.class { - .class { - .class { - .class {} - } - } -} - -.class { - .class { - .class { - .class { - animation: slidein 3s; - } - } - } -} - -.class { - animation: slidein 3s; - .class { - animation: slidein 3s; - .class { - animation: slidein 3s; - .class { - animation: slidein 3s; - } - } - } -} - -.class { - color: red; - background: var(--color); -} - -@keyframes test { - 0% { - color: red; - } - 100% { - color: blue; - } -} - -:local(.class) { - color: red; -} - -:local .class { - color: green; -} - -:global(.class) { - color: blue; -} - -:global .class { - color: white; -} - -:export { - foo: bar; -} - -.class { - animation: test 1s, test; -} - -head{--webpack-main:\\\\.\\\\.\\\\/css-modules\\\\/style\\\\.module\\\\.css,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-mode\\\\/mode\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/node_modules\\\\/style-and-main-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-webpack\\\\/webpack\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-nested\\\\/default\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 8e03c8ae188..adbe68e56eb 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -77,8 +77,12 @@ p { color: steelblue; } -/* Not valid */ -/* Not valid */ +.default { + color: steelblue; +} + +/* Failed */ + body { background: black; @@ -1238,679 +1242,7 @@ body { background: red; } -head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-mode\\\\/mode\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/node_modules\\\\/style-and-main-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-webpack\\\\/webpack\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", -] -`; - -exports[`ConfigTestCases css pure-css exported tests should compile 1`] = ` -Array [ - ".class { - color: red; -} - -.local1, -.local2 :global .global, -.local3 { - color: green; -} - -:global .global :local .local4 { - color: yellow; -} - -.local5:global(.global).local6 { - color: blue; -} - -.local7 div:not(.disabled, .mButtonDisabled, .tipOnly) { - pointer-events: initial !important; -} - -.local8 :is(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local9 :matches(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local10 :where(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -.local11 div:has(.disabled, .mButtonDisabled, .tipOnly) { - pointer-events: initial !important; -} - -.local12 div:current(p, span) { - background-color: yellow; -} - -.local13 div:past(p, span) { - display: none; -} - -.local14 div:future(p, span) { - background-color: yellow; -} - -.local15 div:-moz-any(ol, ul, menu, dir) { - list-style-type: square; -} - -.local16 li:-webkit-any(:first-child, :last-child) { - background-color: aquamarine; -} - -.local9 :matches(div.parent1.child1.vertical-tiny, - div.parent1.child1.vertical-small, - div.otherDiv.horizontal-tiny, - div.otherDiv.horizontal-small div.description) { - max-height: 0; - margin: 0; - overflow: hidden; -} - -:global(:global(:local(.nested1)).nested2).nested3 { - color: pink; -} - -#ident { - color: purple; -} - -@keyframes localkeyframes { - 0% { - left: var(--pos1x); - top: var(--pos1y); - color: var(--theme-color1); - } - 100% { - left: var(--pos2x); - top: var(--pos2y); - color: var(--theme-color2); - } -} - -@keyframes localkeyframes2 { - 0% { - left: 0; - } - 100% { - left: 100px; - } -} - -.animation { - animation-name: localkeyframes; - animation: 3s ease-in 1s 2 reverse both paused localkeyframes, localkeyframes2; - --pos1x: 0px; - --pos1y: 0px; - --pos2x: 10px; - --pos2y: 20px; -} - -/* .composed { - composes: local1; - composes: local2; -} */ - -.vars { - color: var(--local-color); - --local-color: red; -} - -.globalVars :global { - color: var(--global-color); - --global-color: red; -} - -@media (min-width: 1600px) { - .wideScreenClass { - color: var(--local-color); - --local-color: green; - } -} - -@media screen and (max-width: 600px) { - .narrowScreenClass { - color: var(--local-color); - --local-color: purple; - } -} - -@supports (display: grid) { - .displayGridInSupports { - display: grid; - } -} - -@supports not (display: grid) { - .floatRightInNegativeSupports { - float: right; - } -} - -@supports (display: flex) { - @media screen and (min-width: 900px) { - .displayFlexInMediaInSupports { - display: flex; - } - } -} - -@media screen and (min-width: 900px) { - @supports (display: flex) { - .displayFlexInSupportsInMedia { - display: flex; - } - } -} - -@MEDIA screen and (min-width: 900px) { - @SUPPORTS (display: flex) { - .displayFlexInSupportsInMediaUpperCase { - display: flex; - } - } -} - -.animationUpperCase { - ANIMATION-NAME: localkeyframesUPPERCASE; - ANIMATION: 3s ease-in 1s 2 reverse both paused localkeyframesUPPERCASE, localkeyframes2UPPPERCASE; - --pos1x: 0px; - --pos1y: 0px; - --pos2x: 10px; - --pos2y: 20px; -} - -@KEYFRAMES localkeyframesUPPERCASE { - 0% { - left: VAR(--pos1x); - top: VAR(--pos1y); - color: VAR(--theme-color1); - } - 100% { - left: VAR(--pos2x); - top: VAR(--pos2y); - color: VAR(--theme-color2); - } -} - -@KEYframes localkeyframes2UPPPERCASE { - 0% { - left: 0; - } - 100% { - left: 100px; - } -} - -:GLOBAL .globalUpperCase :LOCAL .localUpperCase { - color: yellow; -} - -.VARS { - color: VAR(--LOCAL-COLOR); - --LOCAL-COLOR: red; -} - -.globalVarsUpperCase :GLOBAL { - COLOR: VAR(--GLOBAR-COLOR); - --GLOBAR-COLOR: red; -} - -@supports (top: env(safe-area-inset-top, 0)) { - .inSupportScope { - color: red; - } -} - -.a { - animation: 3s animationName; - -webkit-animation: 3s animationName; -} - -.b { - animation: animationName 3s; - -webkit-animation: animationName 3s; -} - -.c { - animation-name: animationName; - -webkit-animation-name: animationName; -} - -.d { - --animation-name: animationName; -} - -@keyframes animationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@-webkit-keyframes animationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@-moz-keyframes mozAnimationName { - 0% { - background: white; - } - 100% { - background: red; - } -} - -@counter-style thumbs { - system: cyclic; - symbols: \\"\\\\1F44D\\"; - suffix: \\" \\"; -} - -@font-feature-values Font One { - @styleset { - nice-style: 12; - } -} - -/* At-rule for \\"nice-style\\" in Font Two */ -@font-feature-values Font Two { - @styleset { - nice-style: 4; - } -} - -@property --my-color { - syntax: \\"\\"; - inherits: false; - initial-value: #c0ffee; -} - -.class { - color: var(--my-color); -} - -@layer utilities { - .padding-sm { - padding: 0.5rem; - } - - .padding-lg { - padding: 0.8rem; - } -} - -.class { - color: red; - - .nested-pure { - color: red; - } - - @media screen and (min-width: 200px) { - color: blue; - - .nested-media { - color: blue; - } - } - - @supports (display: flex) { - display: flex; - - .nested-supports { - display: flex; - } - } - - @layer foo { - background: red; - - .nested-layer { - background: red; - } - } - - @container foo { - background: red; - - .nested-layer { - background: red; - } - } -} - -.not-selector-inside { - color: #fff; - opacity: 0.12; - padding: .5px; - unknown: :local(.test); - unknown1: :local .test; - unknown2: :global .test; - unknown3: :global .test; - unknown4: .foo, .bar, #bar; -} - -@unknown :local .local :global .global { - color: red; -} - -@unknown :local(.local) :global(.global) { - color: red; -} - -.nested-var { - .again { - color: var(--local-color); - } -} - -.nested-with-local-pseudo { - color: red; - - :local .local-nested { - color: red; - } - - :global .global-nested { - color: red; - } - - :local(.local-nested) { - color: red; - } - - :global(.global-nested) { - color: red; - } - - :local .local-nested, :global .global-nested-next { - color: red; - } - - :local(.local-nested), :global(.global-nested-next) { - color: red; - } - - :global .foo, .bar { - color: red; - } -} - -#id-foo { - color: red; - - #id-bar { - color: red; - } -} - -.nested-parens { - .local9 div:has(.vertical-tiny, .vertical-small) { - max-height: 0; - margin: 0; - overflow: hidden; - } -} - -:global .global-foo { - .nested-global { - color: red; - } - - :local .local-in-global { - color: blue; - } -} - -@unknown .class { - color: red; - - .class { - color: red; - } -} - -:global .class :local .in-local-global-scope, -:global .class :local .in-local-global-scope, -:local .class-local-scope :global .in-local-global-scope { - color: red; -} - -@container (width > 400px) { - .class-in-container { - font-size: 1.5em; - } -} - -@container summary (min-width: 400px) { - @container (width > 400px) { - .deep-class-in-container { - font-size: 1.5em; - } - } -} - -:scope { - color: red; -} - -.placeholder-gray-700:-ms-input-placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} -.placeholder-gray-700::-ms-input-placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} -.placeholder-gray-700::placeholder { - --placeholder-opacity: 1; - color: #4a5568; - color: rgba(74, 85, 104, var(--placeholder-opacity)); -} - -:root { - --test: dark; -} - -@media screen and (prefers-color-scheme: var(--test)) { - .baz { - color: white; - } -} - -@keyframes slidein { - from { - margin-left: 100%; - width: 300%; - } - - to { - margin-left: 0%; - width: 100%; - } -} - -.class { - animation: - foo var(--animation-name) 3s, - var(--animation-name) 3s, - 3s linear 1s infinite running slidein, - 3s linear env(foo, var(--baz)) infinite running slidein; -} - -:root { - --baz: 10px; -} - -.class { - bar: env(foo, var(--baz)); -} - -:global .global-foo, :local .bar { - :local .local-in-global { - color: blue; - } - - @media screen { - :global .my-global-class-again, - :local .my-global-class-again { - color: red; - } - } -} - -.first-nested { - .first-nested-nested { - color: red; - } -} - -.first-nested-at-rule { - @media screen { - .first-nested-nested-at-rule-deep { - color: red; - } - } -} - -:global .again-global { - color:red; -} - -:global .again-again-global { - :global .again-again-global { - color: red; - } -} - -:root { - --foo: red; -} - -:global .again-again-global { - color: var(--foo); - - :global .again-again-global { - color: var(--foo); - } -} - -:global .again-again-global { - animation: slidein 3s; - - :global .again-again-global, .class, :global(:global(:local(.nested1)).nested2).nested3 { - animation: slidein 3s; - } - - .local2 :global .global, - .local3 { - color: red; - } -} - -@unknown var(--foo) { - color: red; -} - -.class { - .class { - .class { - .class {} - } - } -} - -.class { - .class { - .class { - .class { - animation: slidein 3s; - } - } - } -} - -.class { - animation: slidein 3s; - .class { - animation: slidein 3s; - .class { - animation: slidein 3s; - .class { - animation: slidein 3s; - } - } - } -} - -.class { - color: red; - background: var(--color); -} - -@keyframes test { - 0% { - color: red; - } - 100% { - color: blue; - } -} - -:local(.class) { - color: red; -} - -:local .class { - color: green; -} - -:global(.class) { - color: blue; -} - -:global .class { - color: white; -} - -:export { - foo: bar; -} - -.class { - animation: test 1s, test; -} - -head{--webpack-main:\\\\.\\\\.\\\\/css-modules\\\\/style\\\\.module\\\\.css,\\\\.\\\\/style\\\\.css;}", +head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external\\\\.css,\\\\/\\\\/example\\\\.com\\\\/style\\\\.css,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Roboto,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC,https\\\\:\\\\/\\\\/fonts\\\\.googleapis\\\\.com\\\\/css\\\\?family\\\\=Noto\\\\+Sans\\\\+TC\\\\|Roboto,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external1\\\\.css,https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/\\\\.\\\\.\\\\/configCases\\\\/css\\\\/css-import\\\\/external2\\\\.css,\\\\.\\\\/node_modules\\\\/style-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/main-field\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/package-with-exports\\\\/style\\\\.css,\\\\.\\\\/extensions-imported\\\\.mycss,\\\\.\\\\/file\\\\.less,\\\\.\\\\/with-less-import\\\\.css,\\\\.\\\\/prefer-relative\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style\\\\/default\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-mode\\\\/mode\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-subpath-extra\\\\/dist\\\\/custom\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-less\\\\/default\\\\.less,\\\\.\\\\/node_modules\\\\/condition-names-custom-name\\\\/custom-name\\\\.css,\\\\.\\\\/node_modules\\\\/style-and-main-library\\\\/styles\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-webpack\\\\/webpack\\\\.css,\\\\.\\\\/node_modules\\\\/condition-names-style-nested\\\\/default\\\\.css,\\\\.\\\\/style-import\\\\.css,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=19,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=20,\\\\.\\\\/print\\\\.css\\\\?foo\\\\=21,\\\\.\\\\/imported\\\\.css\\\\?2fc7,\\\\.\\\\/imported\\\\.css\\\\?8e23,\\\\.\\\\/imported\\\\.css\\\\?daf4,\\\\.\\\\/imported\\\\.css\\\\?7a8d,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style2\\\\.css\\\\?3989,\\\\.\\\\/style2\\\\.css\\\\?1933,\\\\.\\\\/style2\\\\.css\\\\?6611,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?0d7a,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=1\\\\&bar\\\\=1\\\\#hash\\\\?2c9a,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=1,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=2,\\\\.\\\\/style3\\\\.css\\\\?bar\\\\=3,\\\\.\\\\/style3\\\\.css\\\\?\\\\=bar4,\\\\.\\\\/styl\\\\'le7\\\\.css,\\\\.\\\\/styl\\\\'le7\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/test\\\\.css,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/test\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/test\\\\ test\\\\.css\\\\?fpp\\\\=10,\\\\.\\\\/test\\\\ test\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=bazz,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?023f,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=bar\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?\\\\#hash,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style4\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/string-loader\\\\.js\\\\?esModule\\\\=false\\\\!\\\\.\\\\/test\\\\.css\\\\?4a4a,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20red\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\,a\\\\%20\\\\%7B\\\\%0D\\\\%0A\\\\%20\\\\%20color\\\\%3A\\\\%20blue\\\\%3B\\\\%0D\\\\%0A\\\\%7D,data\\\\:text\\\\/css\\\\;charset\\\\=utf-8\\\\;base64\\\\,YSB7DQogIGNvbG9yOiByZWQ7DQp9,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style5\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?14ba,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=3\\\\?0e0d,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/layer\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=1,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=2,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=3,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=4,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=5,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=6,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=7,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=8,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=9,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=10,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=11,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=12,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=13,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=14,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=15,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=16,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=17,\\\\.\\\\/style6\\\\.css\\\\?foo\\\\=18,\\\\.\\\\/style8\\\\.css\\\\?5018,\\\\.\\\\/style8\\\\.css\\\\?204b,\\\\.\\\\/style8\\\\.css\\\\?63b0,\\\\.\\\\/style8\\\\.css\\\\?edb8,\\\\.\\\\/style8\\\\.css\\\\?6154,\\\\.\\\\/style8\\\\.css\\\\?8c51,\\\\.\\\\/style8\\\\.css\\\\?ced0,\\\\.\\\\/style8\\\\.css\\\\?d3b8,\\\\.\\\\/style8\\\\.css\\\\?3557,\\\\.\\\\/style8\\\\.css\\\\?ae6e,\\\\.\\\\/style8\\\\.css\\\\?d078,\\\\.\\\\/style8\\\\.css\\\\?ae8b,\\\\.\\\\/style2\\\\.css\\\\?ee8c,\\\\.\\\\/style9\\\\.css\\\\?5f26,\\\\.\\\\/style9\\\\.css\\\\?6536,\\\\.\\\\/style11\\\\.css,\\\\.\\\\/style12\\\\.css,\\\\.\\\\/style10\\\\.css,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?1b5b,\\\\.\\\\/media-deep-nested\\\\.css,\\\\.\\\\/media-nested\\\\.css,\\\\.\\\\/supports-deep-deep-nested\\\\.css,\\\\.\\\\/supports-deep-nested\\\\.css,\\\\.\\\\/supports-nested\\\\.css,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?2bf1,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?3469,\\\\.\\\\/layer-nested\\\\.css,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?a7dd,\\\\.\\\\/all-deep-nested\\\\.css\\\\?5612,\\\\.\\\\/all-nested\\\\.css\\\\?a3fd,\\\\.\\\\/mixed-deep-deep-nested\\\\.css,\\\\.\\\\/mixed-deep-nested\\\\.css,\\\\.\\\\/mixed-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?8f95,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?40b5,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?e681,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?dc2a,\\\\.\\\\/anonymous-nested\\\\.css\\\\?8aa8,\\\\.\\\\/media-deep-deep-nested\\\\.css\\\\?3aba,\\\\.\\\\/style8\\\\.css\\\\?83bd,\\\\.\\\\/duplicate-nested\\\\.css,\\\\.\\\\/anonymous-deep-deep-nested\\\\.css\\\\?384f,\\\\.\\\\/anonymous-deep-nested\\\\.css\\\\?8c49,\\\\.\\\\/layer-deep-deep-nested\\\\.css\\\\?17f5,\\\\.\\\\/layer-deep-nested\\\\.css\\\\?c345,\\\\.\\\\/anonymous-nested\\\\.css\\\\?d028,\\\\.\\\\/all-deep-deep-nested\\\\.css\\\\?220a,\\\\.\\\\/all-deep-nested\\\\.css\\\\?7c65,\\\\.\\\\/all-nested\\\\.css\\\\?5ae5,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=6,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=7,\\\\.\\\\/style2\\\\.css\\\\?warning\\\\=8,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown1,\\\\.\\\\/style2\\\\.css\\\\?foo\\\\=unknown2,\\\\.\\\\/style2\\\\.css\\\\?unknown3,\\\\.\\\\/style2\\\\.css\\\\?after-namespace,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=1,\\\\.\\\\/style2\\\\.css\\\\?multiple\\\\=3,\\\\.\\\\/style2\\\\.css\\\\?strange\\\\=3,\\\\.\\\\/style\\\\.css;}", ] `; diff --git a/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json b/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json index 58c0b5fade5..72986fb14da 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-custom-name/package.json @@ -1,7 +1,7 @@ { "name": "condition-names-custom-name", "exports": { - "style": { + ".": { "custom-name": "./custom-name.css", "default": "./default.css" } diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json b/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json index 2b142a00b40..3eb7a0ae36c 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-style-less/package.json @@ -1,7 +1,7 @@ { "name": "condition-names-style-less", "exports": { - "style": { + ".": { "default": "./default.less" } } diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json b/test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json index 619e7449daa..19ccd3252ce 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-style-mode/package.json @@ -1,7 +1,7 @@ { "name": "condition-names-style-development", "exports": { - "style": { + ".": { "production": "mode.css", "development": "mode.css", "default": "./default.css" diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-nested/default.css b/test/configCases/css/css-import/node_modules/condition-names-style-nested/default.css new file mode 100644 index 00000000000..03ea02130bf --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-nested/default.css @@ -0,0 +1,3 @@ +.default { + color: steelblue; +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style-nested/package.json b/test/configCases/css/css-import/node_modules/condition-names-style-nested/package.json new file mode 100644 index 00000000000..1181e52d22d --- /dev/null +++ b/test/configCases/css/css-import/node_modules/condition-names-style-nested/package.json @@ -0,0 +1,8 @@ +{ + "name": "condition-names-style-nested", + "exports": { + "style": { + "default": "./default.css" + } + } +} diff --git a/test/configCases/css/css-import/node_modules/condition-names-style/package.json b/test/configCases/css/css-import/node_modules/condition-names-style/package.json index 4d57ec4c653..b397e56043d 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-style/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-style/package.json @@ -1,8 +1,9 @@ { "name": "condition-names-style", "exports": { - "style": { - "default": "./default.css" + ".": { + "style": "./default.css", + "default": "./unknown.css" } } } diff --git a/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json b/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json index 3459cfc2c0e..21c3e50d229 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-webpack-js/package.json @@ -1,8 +1,9 @@ { "name": "condition-names-webpack", "exports": { - "webpack": { - "default": "./webpack.js" + ".": { + "webpack": "./webpack.js", + "default": "./unknown.js" } } } diff --git a/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json b/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json index 865bbd8f591..471a210fa9b 100644 --- a/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json +++ b/test/configCases/css/css-import/node_modules/condition-names-webpack/package.json @@ -1,8 +1,9 @@ { "name": "condition-names-webpack", "exports": { - "webpack": { - "default": "./webpack.css" + ".": { + "webpack": "./webpack.css", + "default": "./unknown.css" } } } diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index cc657415099..c4694f9c2ae 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -1,21 +1,24 @@ @import "style-library"; @import "main-field"; @import "package-with-exports"; -@import url("some-file.js"); -@import "js-import"; -@import "non-exported-css"; -@import "./directory"; @import "./extensions-imported.mycss"; @import "./with-less-import.css"; @import "prefer-relative.css"; @import "condition-names-style"; @import "condition-names-style-mode"; @import "condition-names-subpath/custom.css"; -/* Not valid */ -@import "condition-names-subpath/non-valid.css"; @import "condition-names-subpath-extra/custom.css"; @import "condition-names-style-less"; @import "condition-names-custom-name"; @import "style-and-main-library"; -/* Not valid */ @import "condition-names-webpack"; +@import "condition-names-style-nested"; + +/* Failed */ + +@import "js-import"; +@import "condition-names-webpack-js"; +@import url("some-file.js"); +@import "non-exported-css"; +@import "./directory"; +@import "condition-names-subpath/non-valid.css"; From 078ce2cfce8c0c922c47f8e7f7099b13fe701453 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 23:12:18 +0300 Subject: [PATCH 27/29] test: update --- .../ConfigCacheTestCases.longtest.js.snap | 672 ++++++++++++++++++ .../ConfigTestCases.basictest.js.snap | 672 ++++++++++++++++++ 2 files changed, 1344 insertions(+) diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index 11a1cd90dbd..6076cc665fe 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -1246,6 +1246,678 @@ head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\ ] `; +exports[`ConfigCacheTestCases css pure-css exported tests should compile 1`] = ` +Array [ + ".class { + color: red; +} + +.local1, +.local2 :global .global, +.local3 { + color: green; +} + +:global .global :local .local4 { + color: yellow; +} + +.local5:global(.global).local6 { + color: blue; +} + +.local7 div:not(.disabled, .mButtonDisabled, .tipOnly) { + pointer-events: initial !important; +} + +.local8 :is(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local9 :matches(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local10 :where(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local11 div:has(.disabled, .mButtonDisabled, .tipOnly) { + pointer-events: initial !important; +} + +.local12 div:current(p, span) { + background-color: yellow; +} + +.local13 div:past(p, span) { + display: none; +} + +.local14 div:future(p, span) { + background-color: yellow; +} + +.local15 div:-moz-any(ol, ul, menu, dir) { + list-style-type: square; +} + +.local16 li:-webkit-any(:first-child, :last-child) { + background-color: aquamarine; +} + +.local9 :matches(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +:global(:global(:local(.nested1)).nested2).nested3 { + color: pink; +} + +#ident { + color: purple; +} + +@keyframes localkeyframes { + 0% { + left: var(--pos1x); + top: var(--pos1y); + color: var(--theme-color1); + } + 100% { + left: var(--pos2x); + top: var(--pos2y); + color: var(--theme-color2); + } +} + +@keyframes localkeyframes2 { + 0% { + left: 0; + } + 100% { + left: 100px; + } +} + +.animation { + animation-name: localkeyframes; + animation: 3s ease-in 1s 2 reverse both paused localkeyframes, localkeyframes2; + --pos1x: 0px; + --pos1y: 0px; + --pos2x: 10px; + --pos2y: 20px; +} + +/* .composed { + composes: local1; + composes: local2; +} */ + +.vars { + color: var(--local-color); + --local-color: red; +} + +.globalVars :global { + color: var(--global-color); + --global-color: red; +} + +@media (min-width: 1600px) { + .wideScreenClass { + color: var(--local-color); + --local-color: green; + } +} + +@media screen and (max-width: 600px) { + .narrowScreenClass { + color: var(--local-color); + --local-color: purple; + } +} + +@supports (display: grid) { + .displayGridInSupports { + display: grid; + } +} + +@supports not (display: grid) { + .floatRightInNegativeSupports { + float: right; + } +} + +@supports (display: flex) { + @media screen and (min-width: 900px) { + .displayFlexInMediaInSupports { + display: flex; + } + } +} + +@media screen and (min-width: 900px) { + @supports (display: flex) { + .displayFlexInSupportsInMedia { + display: flex; + } + } +} + +@MEDIA screen and (min-width: 900px) { + @SUPPORTS (display: flex) { + .displayFlexInSupportsInMediaUpperCase { + display: flex; + } + } +} + +.animationUpperCase { + ANIMATION-NAME: localkeyframesUPPERCASE; + ANIMATION: 3s ease-in 1s 2 reverse both paused localkeyframesUPPERCASE, localkeyframes2UPPPERCASE; + --pos1x: 0px; + --pos1y: 0px; + --pos2x: 10px; + --pos2y: 20px; +} + +@KEYFRAMES localkeyframesUPPERCASE { + 0% { + left: VAR(--pos1x); + top: VAR(--pos1y); + color: VAR(--theme-color1); + } + 100% { + left: VAR(--pos2x); + top: VAR(--pos2y); + color: VAR(--theme-color2); + } +} + +@KEYframes localkeyframes2UPPPERCASE { + 0% { + left: 0; + } + 100% { + left: 100px; + } +} + +:GLOBAL .globalUpperCase :LOCAL .localUpperCase { + color: yellow; +} + +.VARS { + color: VAR(--LOCAL-COLOR); + --LOCAL-COLOR: red; +} + +.globalVarsUpperCase :GLOBAL { + COLOR: VAR(--GLOBAR-COLOR); + --GLOBAR-COLOR: red; +} + +@supports (top: env(safe-area-inset-top, 0)) { + .inSupportScope { + color: red; + } +} + +.a { + animation: 3s animationName; + -webkit-animation: 3s animationName; +} + +.b { + animation: animationName 3s; + -webkit-animation: animationName 3s; +} + +.c { + animation-name: animationName; + -webkit-animation-name: animationName; +} + +.d { + --animation-name: animationName; +} + +@keyframes animationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@-webkit-keyframes animationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@-moz-keyframes mozAnimationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@counter-style thumbs { + system: cyclic; + symbols: \\"\\\\1F44D\\"; + suffix: \\" \\"; +} + +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} + +/* At-rule for \\"nice-style\\" in Font Two */ +@font-feature-values Font Two { + @styleset { + nice-style: 4; + } +} + +@property --my-color { + syntax: \\"\\"; + inherits: false; + initial-value: #c0ffee; +} + +.class { + color: var(--my-color); +} + +@layer utilities { + .padding-sm { + padding: 0.5rem; + } + + .padding-lg { + padding: 0.8rem; + } +} + +.class { + color: red; + + .nested-pure { + color: red; + } + + @media screen and (min-width: 200px) { + color: blue; + + .nested-media { + color: blue; + } + } + + @supports (display: flex) { + display: flex; + + .nested-supports { + display: flex; + } + } + + @layer foo { + background: red; + + .nested-layer { + background: red; + } + } + + @container foo { + background: red; + + .nested-layer { + background: red; + } + } +} + +.not-selector-inside { + color: #fff; + opacity: 0.12; + padding: .5px; + unknown: :local(.test); + unknown1: :local .test; + unknown2: :global .test; + unknown3: :global .test; + unknown4: .foo, .bar, #bar; +} + +@unknown :local .local :global .global { + color: red; +} + +@unknown :local(.local) :global(.global) { + color: red; +} + +.nested-var { + .again { + color: var(--local-color); + } +} + +.nested-with-local-pseudo { + color: red; + + :local .local-nested { + color: red; + } + + :global .global-nested { + color: red; + } + + :local(.local-nested) { + color: red; + } + + :global(.global-nested) { + color: red; + } + + :local .local-nested, :global .global-nested-next { + color: red; + } + + :local(.local-nested), :global(.global-nested-next) { + color: red; + } + + :global .foo, .bar { + color: red; + } +} + +#id-foo { + color: red; + + #id-bar { + color: red; + } +} + +.nested-parens { + .local9 div:has(.vertical-tiny, .vertical-small) { + max-height: 0; + margin: 0; + overflow: hidden; + } +} + +:global .global-foo { + .nested-global { + color: red; + } + + :local .local-in-global { + color: blue; + } +} + +@unknown .class { + color: red; + + .class { + color: red; + } +} + +:global .class :local .in-local-global-scope, +:global .class :local .in-local-global-scope, +:local .class-local-scope :global .in-local-global-scope { + color: red; +} + +@container (width > 400px) { + .class-in-container { + font-size: 1.5em; + } +} + +@container summary (min-width: 400px) { + @container (width > 400px) { + .deep-class-in-container { + font-size: 1.5em; + } + } +} + +:scope { + color: red; +} + +.placeholder-gray-700:-ms-input-placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} +.placeholder-gray-700::-ms-input-placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} +.placeholder-gray-700::placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} + +:root { + --test: dark; +} + +@media screen and (prefers-color-scheme: var(--test)) { + .baz { + color: white; + } +} + +@keyframes slidein { + from { + margin-left: 100%; + width: 300%; + } + + to { + margin-left: 0%; + width: 100%; + } +} + +.class { + animation: + foo var(--animation-name) 3s, + var(--animation-name) 3s, + 3s linear 1s infinite running slidein, + 3s linear env(foo, var(--baz)) infinite running slidein; +} + +:root { + --baz: 10px; +} + +.class { + bar: env(foo, var(--baz)); +} + +:global .global-foo, :local .bar { + :local .local-in-global { + color: blue; + } + + @media screen { + :global .my-global-class-again, + :local .my-global-class-again { + color: red; + } + } +} + +.first-nested { + .first-nested-nested { + color: red; + } +} + +.first-nested-at-rule { + @media screen { + .first-nested-nested-at-rule-deep { + color: red; + } + } +} + +:global .again-global { + color:red; +} + +:global .again-again-global { + :global .again-again-global { + color: red; + } +} + +:root { + --foo: red; +} + +:global .again-again-global { + color: var(--foo); + + :global .again-again-global { + color: var(--foo); + } +} + +:global .again-again-global { + animation: slidein 3s; + + :global .again-again-global, .class, :global(:global(:local(.nested1)).nested2).nested3 { + animation: slidein 3s; + } + + .local2 :global .global, + .local3 { + color: red; + } +} + +@unknown var(--foo) { + color: red; +} + +.class { + .class { + .class { + .class {} + } + } +} + +.class { + .class { + .class { + .class { + animation: slidein 3s; + } + } + } +} + +.class { + animation: slidein 3s; + .class { + animation: slidein 3s; + .class { + animation: slidein 3s; + .class { + animation: slidein 3s; + } + } + } +} + +.class { + color: red; + background: var(--color); +} + +@keyframes test { + 0% { + color: red; + } + 100% { + color: blue; + } +} + +:local(.class) { + color: red; +} + +:local .class { + color: green; +} + +:global(.class) { + color: blue; +} + +:global .class { + color: white; +} + +:export { + foo: bar; +} + +.class { + animation: test 1s, test; +} + +head{--webpack-main:\\\\.\\\\.\\\\/css-modules\\\\/style\\\\.module\\\\.css,\\\\.\\\\/style\\\\.css;}", +] +`; + exports[`ConfigCacheTestCases css urls exported tests should be able to handle styles in div.css 1`] = ` Object { "--foo": " url(img.09a1a1112c577c279435.png)", diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index adbe68e56eb..52a9245d0e2 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -1246,6 +1246,678 @@ head{--webpack-main:https\\\\:\\\\/\\\\/test\\\\.cases\\\\/path\\\\/\\\\.\\\\.\\ ] `; +exports[`ConfigTestCases css pure-css exported tests should compile 1`] = ` +Array [ + ".class { + color: red; +} + +.local1, +.local2 :global .global, +.local3 { + color: green; +} + +:global .global :local .local4 { + color: yellow; +} + +.local5:global(.global).local6 { + color: blue; +} + +.local7 div:not(.disabled, .mButtonDisabled, .tipOnly) { + pointer-events: initial !important; +} + +.local8 :is(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local9 :matches(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local10 :where(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +.local11 div:has(.disabled, .mButtonDisabled, .tipOnly) { + pointer-events: initial !important; +} + +.local12 div:current(p, span) { + background-color: yellow; +} + +.local13 div:past(p, span) { + display: none; +} + +.local14 div:future(p, span) { + background-color: yellow; +} + +.local15 div:-moz-any(ol, ul, menu, dir) { + list-style-type: square; +} + +.local16 li:-webkit-any(:first-child, :last-child) { + background-color: aquamarine; +} + +.local9 :matches(div.parent1.child1.vertical-tiny, + div.parent1.child1.vertical-small, + div.otherDiv.horizontal-tiny, + div.otherDiv.horizontal-small div.description) { + max-height: 0; + margin: 0; + overflow: hidden; +} + +:global(:global(:local(.nested1)).nested2).nested3 { + color: pink; +} + +#ident { + color: purple; +} + +@keyframes localkeyframes { + 0% { + left: var(--pos1x); + top: var(--pos1y); + color: var(--theme-color1); + } + 100% { + left: var(--pos2x); + top: var(--pos2y); + color: var(--theme-color2); + } +} + +@keyframes localkeyframes2 { + 0% { + left: 0; + } + 100% { + left: 100px; + } +} + +.animation { + animation-name: localkeyframes; + animation: 3s ease-in 1s 2 reverse both paused localkeyframes, localkeyframes2; + --pos1x: 0px; + --pos1y: 0px; + --pos2x: 10px; + --pos2y: 20px; +} + +/* .composed { + composes: local1; + composes: local2; +} */ + +.vars { + color: var(--local-color); + --local-color: red; +} + +.globalVars :global { + color: var(--global-color); + --global-color: red; +} + +@media (min-width: 1600px) { + .wideScreenClass { + color: var(--local-color); + --local-color: green; + } +} + +@media screen and (max-width: 600px) { + .narrowScreenClass { + color: var(--local-color); + --local-color: purple; + } +} + +@supports (display: grid) { + .displayGridInSupports { + display: grid; + } +} + +@supports not (display: grid) { + .floatRightInNegativeSupports { + float: right; + } +} + +@supports (display: flex) { + @media screen and (min-width: 900px) { + .displayFlexInMediaInSupports { + display: flex; + } + } +} + +@media screen and (min-width: 900px) { + @supports (display: flex) { + .displayFlexInSupportsInMedia { + display: flex; + } + } +} + +@MEDIA screen and (min-width: 900px) { + @SUPPORTS (display: flex) { + .displayFlexInSupportsInMediaUpperCase { + display: flex; + } + } +} + +.animationUpperCase { + ANIMATION-NAME: localkeyframesUPPERCASE; + ANIMATION: 3s ease-in 1s 2 reverse both paused localkeyframesUPPERCASE, localkeyframes2UPPPERCASE; + --pos1x: 0px; + --pos1y: 0px; + --pos2x: 10px; + --pos2y: 20px; +} + +@KEYFRAMES localkeyframesUPPERCASE { + 0% { + left: VAR(--pos1x); + top: VAR(--pos1y); + color: VAR(--theme-color1); + } + 100% { + left: VAR(--pos2x); + top: VAR(--pos2y); + color: VAR(--theme-color2); + } +} + +@KEYframes localkeyframes2UPPPERCASE { + 0% { + left: 0; + } + 100% { + left: 100px; + } +} + +:GLOBAL .globalUpperCase :LOCAL .localUpperCase { + color: yellow; +} + +.VARS { + color: VAR(--LOCAL-COLOR); + --LOCAL-COLOR: red; +} + +.globalVarsUpperCase :GLOBAL { + COLOR: VAR(--GLOBAR-COLOR); + --GLOBAR-COLOR: red; +} + +@supports (top: env(safe-area-inset-top, 0)) { + .inSupportScope { + color: red; + } +} + +.a { + animation: 3s animationName; + -webkit-animation: 3s animationName; +} + +.b { + animation: animationName 3s; + -webkit-animation: animationName 3s; +} + +.c { + animation-name: animationName; + -webkit-animation-name: animationName; +} + +.d { + --animation-name: animationName; +} + +@keyframes animationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@-webkit-keyframes animationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@-moz-keyframes mozAnimationName { + 0% { + background: white; + } + 100% { + background: red; + } +} + +@counter-style thumbs { + system: cyclic; + symbols: \\"\\\\1F44D\\"; + suffix: \\" \\"; +} + +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} + +/* At-rule for \\"nice-style\\" in Font Two */ +@font-feature-values Font Two { + @styleset { + nice-style: 4; + } +} + +@property --my-color { + syntax: \\"\\"; + inherits: false; + initial-value: #c0ffee; +} + +.class { + color: var(--my-color); +} + +@layer utilities { + .padding-sm { + padding: 0.5rem; + } + + .padding-lg { + padding: 0.8rem; + } +} + +.class { + color: red; + + .nested-pure { + color: red; + } + + @media screen and (min-width: 200px) { + color: blue; + + .nested-media { + color: blue; + } + } + + @supports (display: flex) { + display: flex; + + .nested-supports { + display: flex; + } + } + + @layer foo { + background: red; + + .nested-layer { + background: red; + } + } + + @container foo { + background: red; + + .nested-layer { + background: red; + } + } +} + +.not-selector-inside { + color: #fff; + opacity: 0.12; + padding: .5px; + unknown: :local(.test); + unknown1: :local .test; + unknown2: :global .test; + unknown3: :global .test; + unknown4: .foo, .bar, #bar; +} + +@unknown :local .local :global .global { + color: red; +} + +@unknown :local(.local) :global(.global) { + color: red; +} + +.nested-var { + .again { + color: var(--local-color); + } +} + +.nested-with-local-pseudo { + color: red; + + :local .local-nested { + color: red; + } + + :global .global-nested { + color: red; + } + + :local(.local-nested) { + color: red; + } + + :global(.global-nested) { + color: red; + } + + :local .local-nested, :global .global-nested-next { + color: red; + } + + :local(.local-nested), :global(.global-nested-next) { + color: red; + } + + :global .foo, .bar { + color: red; + } +} + +#id-foo { + color: red; + + #id-bar { + color: red; + } +} + +.nested-parens { + .local9 div:has(.vertical-tiny, .vertical-small) { + max-height: 0; + margin: 0; + overflow: hidden; + } +} + +:global .global-foo { + .nested-global { + color: red; + } + + :local .local-in-global { + color: blue; + } +} + +@unknown .class { + color: red; + + .class { + color: red; + } +} + +:global .class :local .in-local-global-scope, +:global .class :local .in-local-global-scope, +:local .class-local-scope :global .in-local-global-scope { + color: red; +} + +@container (width > 400px) { + .class-in-container { + font-size: 1.5em; + } +} + +@container summary (min-width: 400px) { + @container (width > 400px) { + .deep-class-in-container { + font-size: 1.5em; + } + } +} + +:scope { + color: red; +} + +.placeholder-gray-700:-ms-input-placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} +.placeholder-gray-700::-ms-input-placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} +.placeholder-gray-700::placeholder { + --placeholder-opacity: 1; + color: #4a5568; + color: rgba(74, 85, 104, var(--placeholder-opacity)); +} + +:root { + --test: dark; +} + +@media screen and (prefers-color-scheme: var(--test)) { + .baz { + color: white; + } +} + +@keyframes slidein { + from { + margin-left: 100%; + width: 300%; + } + + to { + margin-left: 0%; + width: 100%; + } +} + +.class { + animation: + foo var(--animation-name) 3s, + var(--animation-name) 3s, + 3s linear 1s infinite running slidein, + 3s linear env(foo, var(--baz)) infinite running slidein; +} + +:root { + --baz: 10px; +} + +.class { + bar: env(foo, var(--baz)); +} + +:global .global-foo, :local .bar { + :local .local-in-global { + color: blue; + } + + @media screen { + :global .my-global-class-again, + :local .my-global-class-again { + color: red; + } + } +} + +.first-nested { + .first-nested-nested { + color: red; + } +} + +.first-nested-at-rule { + @media screen { + .first-nested-nested-at-rule-deep { + color: red; + } + } +} + +:global .again-global { + color:red; +} + +:global .again-again-global { + :global .again-again-global { + color: red; + } +} + +:root { + --foo: red; +} + +:global .again-again-global { + color: var(--foo); + + :global .again-again-global { + color: var(--foo); + } +} + +:global .again-again-global { + animation: slidein 3s; + + :global .again-again-global, .class, :global(:global(:local(.nested1)).nested2).nested3 { + animation: slidein 3s; + } + + .local2 :global .global, + .local3 { + color: red; + } +} + +@unknown var(--foo) { + color: red; +} + +.class { + .class { + .class { + .class {} + } + } +} + +.class { + .class { + .class { + .class { + animation: slidein 3s; + } + } + } +} + +.class { + animation: slidein 3s; + .class { + animation: slidein 3s; + .class { + animation: slidein 3s; + .class { + animation: slidein 3s; + } + } + } +} + +.class { + color: red; + background: var(--color); +} + +@keyframes test { + 0% { + color: red; + } + 100% { + color: blue; + } +} + +:local(.class) { + color: red; +} + +:local .class { + color: green; +} + +:global(.class) { + color: blue; +} + +:global .class { + color: white; +} + +:export { + foo: bar; +} + +.class { + animation: test 1s, test; +} + +head{--webpack-main:\\\\.\\\\.\\\\/css-modules\\\\/style\\\\.module\\\\.css,\\\\.\\\\/style\\\\.css;}", +] +`; + exports[`ConfigTestCases css urls exported tests should be able to handle styles in div.css 1`] = ` Object { "--foo": " url(img.09a1a1112c577c279435.png)", From 0798a75f713f0fc270ecb527d039f3a02baa1d1a Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 13 Jun 2023 23:48:58 +0300 Subject: [PATCH 28/29] refactor: update comments --- lib/config/defaults.js | 12 ++++-------- .../ConfigCacheTestCases.longtest.js.snap | 2 ++ test/__snapshots__/ConfigTestCases.basictest.js.snap | 2 ++ test/configCases/css/css-import/style-import.css | 5 ++++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/config/defaults.js b/lib/config/defaults.js index f97381ded4d..9139d0e90c9 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -1485,18 +1485,14 @@ const getResolveDefaults = ({ styleConditions.push(mode === "development" ? "development" : "production"); styleConditions.push("style"); - /** @type {function(): ResolveOptions} */ - const styleDeps = () => ({ - // We avoid using any files because we don't have a spec for that + resolveOptions.byDependency["css-import"] = { + // We avoid using any main files because we have to be consistent with CSS `@import` + // and CSS `@import` does not handle `main` files in directories, + // you should always specify the full URL for styles mainFiles: [], mainFields: ["style", "..."], conditionNames: styleConditions, extensions: [".css"] - }); - - resolveOptions.byDependency["css-import"] = { - ...styleDeps(), - preferRelative: true }; } diff --git a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap index 6076cc665fe..fd825140d75 100644 --- a/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap +++ b/test/__snapshots__/ConfigCacheTestCases.longtest.js.snap @@ -81,6 +81,8 @@ p { color: steelblue; } +/* Technically, this is not entirely true, but we allow it because the final file can be processed by the loader and return the CSS code */ + /* Failed */ diff --git a/test/__snapshots__/ConfigTestCases.basictest.js.snap b/test/__snapshots__/ConfigTestCases.basictest.js.snap index 52a9245d0e2..6c4e2c09e44 100644 --- a/test/__snapshots__/ConfigTestCases.basictest.js.snap +++ b/test/__snapshots__/ConfigTestCases.basictest.js.snap @@ -81,6 +81,8 @@ p { color: steelblue; } +/* Technically, this is not entirely true, but we allow it because the final file can be processed by the loader and return the CSS code */ + /* Failed */ diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index c4694f9c2ae..8694052af84 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -14,11 +14,14 @@ @import "condition-names-webpack"; @import "condition-names-style-nested"; -/* Failed */ +/* Technically, this is not entirely true, but we allow it because the final file can be processed by the loader and return the CSS code */ @import "js-import"; @import "condition-names-webpack-js"; @import url("some-file.js"); + +/* Failed */ + @import "non-exported-css"; @import "./directory"; @import "condition-names-subpath/non-valid.css"; From c350779dd31217811b2d6f61572c0feb986224d9 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Wed, 14 Jun 2023 00:11:03 +0300 Subject: [PATCH 29/29] test: more --- test/Defaults.unittest.js | 6 ++---- test/configCases/css/css-import/errors.js | 3 ++- test/configCases/css/css-import/no-extension-in-request.css | 0 test/configCases/css/css-import/style-import.css | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 test/configCases/css/css-import/no-extension-in-request.css diff --git a/test/Defaults.unittest.js b/test/Defaults.unittest.js index 9792794de84..e9e398b9d4a 100644 --- a/test/Defaults.unittest.js +++ b/test/Defaults.unittest.js @@ -2207,8 +2207,6 @@ describe("snapshots", () => { + }, + "futureDefaults": true, @@ ... @@ - + }, - + Object { + "rules": Array [ + Object { + "descriptionData": Object { @@ -2254,7 +2252,8 @@ describe("snapshots", () => { + }, + ], + "test": /\\.css$/i, - @@ ... @@ + + }, + + Object { + "mimetype": "text/css+module", + "resolve": Object { + "fullySpecified": true, @@ -2301,7 +2300,6 @@ describe("snapshots", () => { + "...", + ], + "mainFiles": Array [], - + "preferRelative": true, + }, @@ ... @@ - "/node_modules/", diff --git a/test/configCases/css/css-import/errors.js b/test/configCases/css/css-import/errors.js index 2acea2c2b91..290655b24f3 100644 --- a/test/configCases/css/css-import/errors.js +++ b/test/configCases/css/css-import/errors.js @@ -1,5 +1,6 @@ module.exports = [ /Can't resolve 'non-exported-css'/, /Can't resolve '\.\/directory'/, - /Can't resolve 'condition-names-subpath\/non-valid\.css'/ + /Can't resolve 'condition-names-subpath\/non-valid\.css'/, + /Can't resolve '\.\/no-extension-in-request'/ ]; diff --git a/test/configCases/css/css-import/no-extension-in-request.css b/test/configCases/css/css-import/no-extension-in-request.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/css/css-import/style-import.css b/test/configCases/css/css-import/style-import.css index 8694052af84..043966ece80 100644 --- a/test/configCases/css/css-import/style-import.css +++ b/test/configCases/css/css-import/style-import.css @@ -25,3 +25,4 @@ @import "non-exported-css"; @import "./directory"; @import "condition-names-subpath/non-valid.css"; +@import "./no-extension-in-request";