diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 192d686e..6616426d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,6 @@ jobs: node-10-canary: node_version: ^10.13.0 webpack_version: next - continue_on_error: true steps: - task: NodeTool@0 inputs: @@ -115,7 +114,6 @@ jobs: node-10-canary: node_version: ^10.13.0 webpack_version: next - continue_on_error: true steps: - task: NodeTool@0 inputs: @@ -172,7 +170,6 @@ jobs: node-10-canary: node_version: ^10.13.0 webpack_version: next - continue_on_error: true steps: - script: 'git config --global core.autocrlf input' displayName: 'Config git core.autocrlf' diff --git a/package-lock.json b/package-lock.json index e868fc77..79338ad5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1476,9 +1476,9 @@ "dev": true }, "@types/node": { - "version": "12.12.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz", - "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==", + "version": "12.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.18.tgz", + "integrity": "sha512-DBkZuIMFuAfjJHiunyRc+aNvmXYNwV1IPMgGKGlwCp6zh6MKrVtmvjSWK/axWcD25KJffkXgkfvFra8ndenXAw==", "dev": true }, "@types/normalize-package-data": { @@ -1786,6 +1786,12 @@ "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", "dev": true }, + "add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", + "dev": true + }, "aggregate-error": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", @@ -2369,6 +2375,16 @@ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -2683,9 +2699,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001015", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001015.tgz", - "integrity": "sha512-/xL2AbW/XWHNu1gnIrO8UitBGoFthcsDgU9VLK1/dpsoxbaD5LscHozKze05R6WLsBvLhqv78dAPozMFQBYLbQ==", + "version": "1.0.30001016", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001016.tgz", + "integrity": "sha512-yYQ2QfotceRiH4U+h1Us86WJXtVHDmy3nEKIdYPsZCYnOV5/tMgGbmoIlrMzmh2VXlproqYtVaKeGDBkMZifFA==", "dev": true }, "caporal": { @@ -3170,11 +3186,12 @@ } }, "conventional-changelog-core": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.1.tgz", - "integrity": "sha512-fBre5P6U9n914Da6Cj82vIfRU2DhTLGr1eDPXWA7AamxTpd4cd0jgdS7Aieas5Vn5WXOJNFRDNl6PrYLEonImg==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.1.4.tgz", + "integrity": "sha512-LO58ZbEpp1Ul+y/vOI8rJRsWkovsYkCFbOCVgi6UnVfU8WC0F8K8VQQwaBZWWUpb6JvEiN4GBR5baRP2txZ+Vg==", "dev": true, "requires": { + "add-stream": "^1.0.0", "conventional-changelog-writer": "^4.0.11", "conventional-commits-parser": "^3.0.8", "dateformat": "^3.0.0", @@ -4530,9 +4547,9 @@ "dev": true }, "inquirer": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", - "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz", + "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -4544,7 +4561,7 @@ "lodash": "^4.17.15", "mute-stream": "0.0.8", "run-async": "^2.2.0", - "rxjs": "^6.4.0", + "rxjs": "^6.5.3", "string-width": "^4.1.0", "strip-ansi": "^5.1.0", "through": "^2.3.6" @@ -5147,9 +5164,9 @@ } }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fast-levenshtein": { "version": "2.0.6", @@ -5210,6 +5227,13 @@ "schema-utils": "^2.5.0" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -5450,14 +5474,15 @@ "dev": true }, "fsevents": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.10.tgz", - "integrity": "sha512-Dw5DScF/8AWhWzWRbnQrFJfeR/TOJZjRr9Du9kfmd8t234ICcVeDBlauFl/jVcE5ZewhlPoCFvIqp0SE3kAVxA==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "dev": true, "optional": true, "requires": { + "bindings": "^1.5.0", "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "node-pre-gyp": "*" }, "dependencies": { "abbrev": { @@ -5728,7 +5753,7 @@ } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.14.0", "bundled": true, "dev": true, "optional": true, @@ -5742,7 +5767,7 @@ "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", - "tar": "^4" + "tar": "^4.4.2" } }, "nopt": { @@ -7243,12 +7268,12 @@ "dev": true }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", "dev": true, "requires": { - "has": "^1.0.1" + "has": "^1.0.3" } }, "is-regexp": { @@ -11681,34 +11706,13 @@ } }, "string.prototype.padend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", - "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.4.3", - "function-bind": "^1.0.2" - }, - "dependencies": { - "es-abstract": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz", - "integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "string.prototype.trimleft": "^2.1.0", - "string.prototype.trimright": "^2.1.0" - } - } + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, "string.prototype.trimleft": { @@ -12500,9 +12504,9 @@ "dev": true }, "webpack": { - "version": "4.41.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.2.tgz", - "integrity": "sha512-Zhw69edTGfbz9/8JJoyRQ/pq8FYUoY0diOXqW0T6yhgdhCv6wr0hra5DwwWexNRns2Z2+gsnrNcbe9hbGBgk/A==", + "version": "4.41.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.3.tgz", + "integrity": "sha512-EcNzP9jGoxpQAXq1VOoTet0ik7/VVU1MovIfcUSAjLowc7GhcQku/sOXALvq5nPpSei2HF6VRhibeJSC3i/Law==", "dev": true, "requires": { "@webassemblyjs/ast": "1.8.5", @@ -12525,7 +12529,7 @@ "node-libs-browser": "^2.2.1", "schema-utils": "^1.0.0", "tapable": "^1.1.3", - "terser-webpack-plugin": "^1.4.1", + "terser-webpack-plugin": "^1.4.3", "watchpack": "^1.6.0", "webpack-sources": "^1.4.1" }, diff --git a/package.json b/package.json index 003bbb85..09bf9c73 100644 --- a/package.json +++ b/package.json @@ -37,12 +37,10 @@ "defaults": "webpack-defaults" }, "files": [ - "dist/", - "lib/", - "index.js" + "dist" ], "peerDependencies": { - "webpack": "^4.0.0" + "webpack": "^4.0.0 || ^5.0.0" }, "dependencies": { "camelcase": "^5.3.1", @@ -90,7 +88,7 @@ "standard-version": "^7.0.1", "strip-ansi": "^6.0.0", "url-loader": "^3.0.0", - "webpack": "^4.41.2" + "webpack": "^4.41.3" }, "keywords": [ "webpack", diff --git a/test/__snapshots__/icss.test.js.snap b/test/__snapshots__/icss.test.js.snap index 542389d2..bb4dbf57 100644 --- a/test/__snapshots__/icss.test.js.snap +++ b/test/__snapshots__/icss.test.js.snap @@ -162,7 +162,7 @@ exports[`ICSS show work with the case "import": errors 1`] = `Array []`; exports[`ICSS show work with the case "import": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./vars.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./vars.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -176,7 +176,7 @@ exports.locals = { exports[`ICSS show work with the case "import": result 1`] = ` Array [ Array [ - "../../src/index.js?!./icss/tests-cases/import/vars.css", + "../../src/index.js?[ident]!./icss/tests-cases/import/vars.css", " ", "", @@ -199,7 +199,7 @@ exports[`ICSS show work with the case "import-reserved-keywords": errors 1`] = ` exports[`ICSS show work with the case "import-reserved-keywords": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./vars.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./vars.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -214,7 +214,7 @@ exports.locals = { exports[`ICSS show work with the case "import-reserved-keywords": result 1`] = ` Array [ Array [ - "../../src/index.js?!./icss/tests-cases/import-reserved-keywords/vars.css", + "../../src/index.js?[ident]!./icss/tests-cases/import-reserved-keywords/vars.css", " ", "", diff --git a/test/__snapshots__/import-option.test.js.snap b/test/__snapshots__/import-option.test.js.snap index ddcb4b4d..4ea197a1 100644 --- a/test/__snapshots__/import-option.test.js.snap +++ b/test/__snapshots__/import-option.test.js.snap @@ -5,10 +5,10 @@ exports[`"import" option should keep original order: errors 1`] = `Array []`; exports[`"import" option should keep original order: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./order-1.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??ref--4!./order-2.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??ref--4!./order-3.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??ref--4!./order-4.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./order-1.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??[ident]!./order-2.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??[ident]!./order-3.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??[ident]!./order-4.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); exports.push([module.id, \\"@import url(http://example.com/style.css);\\"]); @@ -29,7 +29,7 @@ exports.push([module.id, \\"div {\\\\n width: 100%;\\\\n height: 200px;\\\\n}\ exports[`"import" option should keep original order: result 1`] = ` Array [ Array [ - "../../src/index.js?!./import/order-1.css", + "../../src/index.js?[ident]!./import/order-1.css", ".order-1 { color: red; } @@ -41,7 +41,7 @@ Array [ "@import url(http://example.com/style.css);", ], Array [ - "../../src/index.js?!./import/order-2.css", + "../../src/index.js?[ident]!./import/order-2.css", ".order-1 { color: red; } @@ -53,7 +53,7 @@ Array [ "@import url(http://example.com/style.css);", ], Array [ - "../../src/index.js?!./import/order-1.css", + "../../src/index.js?[ident]!./import/order-1.css", ".order-1 { color: red; } @@ -65,7 +65,7 @@ Array [ "@import url(http://example.com/style.css);", ], Array [ - "../../src/index.js?!./import/order-2.css", + "../../src/index.js?[ident]!./import/order-2.css", ".order-1 { color: red; } @@ -77,7 +77,7 @@ Array [ "@import url(http://example.com/style.css);", ], Array [ - "../../src/index.js?!./import/order-3-1.css", + "../../src/index.js?[ident]!./import/order-3-1.css", ".order-3-1 { color: white; } @@ -85,7 +85,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/order-3.css", + "../../src/index.js?[ident]!./import/order-3.css", ".order-3 { color: red; } @@ -97,7 +97,7 @@ Array [ "@import url(http://example.com/style.css);", ], Array [ - "../../src/index.js?!./import/order-4-1.css", + "../../src/index.js?[ident]!./import/order-4-1.css", ".order-4-1 { color: red; } @@ -105,7 +105,7 @@ Array [ "screen and (min-width: 1000px)", ], Array [ - "../../src/index.js?!./import/order-4-2-1.css", + "../../src/index.js?[ident]!./import/order-4-2-1.css", ".order-4-2-1 { color: red; } @@ -113,7 +113,7 @@ Array [ "screen and (min-width: 2000px)", ], Array [ - "../../src/index.js?!./import/order-4-2-2.css", + "../../src/index.js?[ident]!./import/order-4-2-2.css", ".order-4-2-2 { color: red; } @@ -121,7 +121,7 @@ Array [ "screen and (min-width: 2000px) and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/order-4-2.css", + "../../src/index.js?[ident]!./import/order-4-2.css", ".order-4-2 { color: red; } @@ -129,7 +129,7 @@ Array [ "screen and (min-width: 2000px)", ], Array [ - "../../src/index.js?!./import/order-4.css", + "../../src/index.js?[ident]!./import/order-4.css", ".order-4 { color: red; } @@ -155,16 +155,16 @@ exports[`"import" option should work when "Function": errors 1`] = `Array []`; exports[`"import" option should work when "Function": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./test-media.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??ref--4!./test-other.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??ref--4!./query.css?foo=1&bar=1\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??ref--4!./other-query.css?foo=1&bar=1#hash\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_4___ = require(\\"-!../../../src/index.js??ref--4!./relative.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_5___ = require(\\"-!../../../src/index.js??ref--4!../import/top-relative.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_6___ = require(\\"-!../../../src/index.js??ref--4!package/tilde.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_7___ = require(\\"-!../../../src/index.js??ref--4!aliasesImport/alias.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_8___ = require(\\"-!../../../src/index.js??ref--4!./url.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_9___ = require(\\"-!../../../src/index.js??ref--4!./te'st.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./test-media.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??[ident]!./test-other.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??[ident]!./query.css?foo=1&bar=1\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??[ident]!./other-query.css?foo=1&bar=1#hash\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_4___ = require(\\"-!../../../src/index.js??[ident]!./relative.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_5___ = require(\\"-!../../../src/index.js??[ident]!../import/top-relative.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_6___ = require(\\"-!../../../src/index.js??[ident]!package/tilde.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_7___ = require(\\"-!../../../src/index.js??[ident]!aliasesImport/alias.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_8___ = require(\\"-!../../../src/index.js??[ident]!./url.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_9___ = require(\\"-!../../../src/index.js??[ident]!./te'st.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); @@ -202,7 +202,7 @@ exports.push([module.id, \\"@import url(test.css);\\\\n@import url('test.css');\ exports[`"import" option should work when "Function": result 1`] = ` Array [ Array [ - "../../src/index.js?!./import/test-nested-media.css", + "../../src/index.js?[ident]!./import/test-nested-media.css", "a { b: b; } @@ -210,7 +210,7 @@ Array [ "screen and (orientation:landscape) and (min-width: 100px)", ], Array [ - "../../src/index.js?!./import/test-media.css", + "../../src/index.js?[ident]!./import/test-media.css", ".test { c: c; } @@ -218,7 +218,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test-other.css", + "../../src/index.js?[ident]!./import/test-other.css", ".test { d: d; } @@ -260,7 +260,7 @@ Array [ "@import url(//example.com/style.css);", ], Array [ - "../../src/index.js?!./import/query.css?foo=1&bar=1", + "../../src/index.js?[ident]!./import/query.css?foo=1&bar=1", ".query { e: e; } @@ -268,7 +268,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/other-query.css?foo=1&bar=1#hash", + "../../src/index.js?[ident]!./import/other-query.css?foo=1&bar=1#hash", ".other-query { f: f; } @@ -276,7 +276,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/other-query.css?foo=1&bar=1#hash", + "../../src/index.js?[ident]!./import/other-query.css?foo=1&bar=1#hash", ".other-query { f: f; } @@ -296,7 +296,7 @@ Array [ "@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC|Roboto);", ], Array [ - "../../src/index.js?!./import/relative.css", + "../../src/index.js?[ident]!./import/relative.css", ".relative { color: red; } @@ -304,7 +304,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/top-relative.css", + "../../src/index.js?[ident]!./import/top-relative.css", ".top-relative { color: black; } @@ -312,7 +312,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/node_modules/package/tilde.css", + "../../src/index.js?[ident]!./import/node_modules/package/tilde.css", ".tilde { color: yellow; } @@ -320,7 +320,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/alias.css", + "../../src/index.js?[ident]!./import/alias.css", ".alias { color: red; } @@ -328,7 +328,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/url.css", + "../../src/index.js?[ident]!./import/url.css", ".background-imported { background: url(/webpack/public/path/img.png); } @@ -336,7 +336,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -344,7 +344,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -352,7 +352,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -360,7 +360,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -515,19 +515,19 @@ exports[`"import" option should work when not specified: errors 1`] = `Array []` exports[`"import" option should work when not specified: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./test.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??ref--4!./test-media.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??ref--4!./test-other.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??ref--4!package/test.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_4___ = require(\\"-!../../../src/index.js??ref--4!./query.css?foo=1&bar=1\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_5___ = require(\\"-!../../../src/index.js??ref--4!./other-query.css?foo=1&bar=1#hash\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_6___ = require(\\"-!../../../src/index.js??ref--4!./relative.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_7___ = require(\\"-!../../../src/index.js??ref--4!../import/top-relative.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_8___ = require(\\"-!../../../src/index.js??ref--4!package/tilde.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_9___ = require(\\"-!../../../src/index.js??ref--4!aliasesImport/alias.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_10___ = require(\\"-!../../../src/index.js??ref--4!./url.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_11___ = require(\\"-!../../../src/index.js??ref--4!./te'st.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_12___ = require(\\"-!../../../src/index.js??ref--4!./test test.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./test.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??[ident]!./test-media.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??[ident]!./test-other.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??[ident]!package/test.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_4___ = require(\\"-!../../../src/index.js??[ident]!./query.css?foo=1&bar=1\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_5___ = require(\\"-!../../../src/index.js??[ident]!./other-query.css?foo=1&bar=1#hash\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_6___ = require(\\"-!../../../src/index.js??[ident]!./relative.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_7___ = require(\\"-!../../../src/index.js??[ident]!../import/top-relative.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_8___ = require(\\"-!../../../src/index.js??[ident]!package/tilde.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_9___ = require(\\"-!../../../src/index.js??[ident]!aliasesImport/alias.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_10___ = require(\\"-!../../../src/index.js??[ident]!./url.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_11___ = require(\\"-!../../../src/index.js??[ident]!./te'st.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_12___ = require(\\"-!../../../src/index.js??[ident]!./test test.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); @@ -603,7 +603,7 @@ exports.push([module.id, \\"@import url();\\\\n@import url('');\\\\n@import url( exports[`"import" option should work when not specified: result 1`] = ` Array [ Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -611,7 +611,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -619,7 +619,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -627,7 +627,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -635,7 +635,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -643,7 +643,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -651,7 +651,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -659,7 +659,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -667,7 +667,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -675,7 +675,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -683,7 +683,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -691,7 +691,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -699,7 +699,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -707,7 +707,7 @@ Array [ "screen and (orientation: landscape)", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -715,7 +715,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -723,7 +723,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test-nested-media.css", + "../../src/index.js?[ident]!./import/test-nested-media.css", "a { b: b; } @@ -731,7 +731,7 @@ Array [ "screen and (orientation:landscape) and (min-width: 100px)", ], Array [ - "../../src/index.js?!./import/test-media.css", + "../../src/index.js?[ident]!./import/test-media.css", ".test { c: c; } @@ -739,7 +739,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test-other.css", + "../../src/index.js?[ident]!./import/test-other.css", ".test { d: d; } @@ -781,7 +781,7 @@ Array [ "@import url(//example.com/style.css);", ], Array [ - "../../src/index.js?!./import/node_modules/package/test.css", + "../../src/index.js?[ident]!./import/node_modules/package/test.css", ".test { d: d } @@ -789,7 +789,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/query.css?foo=1&bar=1", + "../../src/index.js?[ident]!./import/query.css?foo=1&bar=1", ".query { e: e; } @@ -797,7 +797,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/other-query.css?foo=1&bar=1#hash", + "../../src/index.js?[ident]!./import/other-query.css?foo=1&bar=1#hash", ".other-query { f: f; } @@ -805,7 +805,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/other-query.css?foo=1&bar=1#hash", + "../../src/index.js?[ident]!./import/other-query.css?foo=1&bar=1#hash", ".other-query { f: f; } @@ -825,7 +825,7 @@ Array [ "@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC|Roboto);", ], Array [ - "../../src/index.js?!./import/relative.css", + "../../src/index.js?[ident]!./import/relative.css", ".relative { color: red; } @@ -833,7 +833,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/top-relative.css", + "../../src/index.js?[ident]!./import/top-relative.css", ".top-relative { color: black; } @@ -841,7 +841,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/node_modules/package/tilde.css", + "../../src/index.js?[ident]!./import/node_modules/package/tilde.css", ".tilde { color: yellow; } @@ -849,7 +849,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/alias.css", + "../../src/index.js?[ident]!./import/alias.css", ".alias { color: red; } @@ -857,7 +857,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/url.css", + "../../src/index.js?[ident]!./import/url.css", ".background-imported { background: url(/webpack/public/path/img.png); } @@ -865,7 +865,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -873,7 +873,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -881,7 +881,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -889,7 +889,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -897,7 +897,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -905,7 +905,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -913,7 +913,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -921,7 +921,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -929,7 +929,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -937,7 +937,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -945,7 +945,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -953,7 +953,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -961,7 +961,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -969,7 +969,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -977,7 +977,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -985,7 +985,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -993,7 +993,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1001,7 +1001,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1009,7 +1009,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1017,7 +1017,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1025,7 +1025,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1033,7 +1033,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1041,7 +1041,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1049,7 +1049,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1057,7 +1057,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1065,7 +1065,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1300,19 +1300,19 @@ exports[`"import" option should work with a value equal to "true": errors 1`] = exports[`"import" option should work with a value equal to "true": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./test.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??ref--4!./test-media.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??ref--4!./test-other.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??ref--4!package/test.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_4___ = require(\\"-!../../../src/index.js??ref--4!./query.css?foo=1&bar=1\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_5___ = require(\\"-!../../../src/index.js??ref--4!./other-query.css?foo=1&bar=1#hash\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_6___ = require(\\"-!../../../src/index.js??ref--4!./relative.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_7___ = require(\\"-!../../../src/index.js??ref--4!../import/top-relative.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_8___ = require(\\"-!../../../src/index.js??ref--4!package/tilde.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_9___ = require(\\"-!../../../src/index.js??ref--4!aliasesImport/alias.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_10___ = require(\\"-!../../../src/index.js??ref--4!./url.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_11___ = require(\\"-!../../../src/index.js??ref--4!./te'st.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_12___ = require(\\"-!../../../src/index.js??ref--4!./test test.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./test.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_1___ = require(\\"-!../../../src/index.js??[ident]!./test-media.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_2___ = require(\\"-!../../../src/index.js??[ident]!./test-other.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_3___ = require(\\"-!../../../src/index.js??[ident]!package/test.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_4___ = require(\\"-!../../../src/index.js??[ident]!./query.css?foo=1&bar=1\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_5___ = require(\\"-!../../../src/index.js??[ident]!./other-query.css?foo=1&bar=1#hash\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_6___ = require(\\"-!../../../src/index.js??[ident]!./relative.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_7___ = require(\\"-!../../../src/index.js??[ident]!../import/top-relative.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_8___ = require(\\"-!../../../src/index.js??[ident]!package/tilde.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_9___ = require(\\"-!../../../src/index.js??[ident]!aliasesImport/alias.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_10___ = require(\\"-!../../../src/index.js??[ident]!./url.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_11___ = require(\\"-!../../../src/index.js??[ident]!./te'st.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_12___ = require(\\"-!../../../src/index.js??[ident]!./test test.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); @@ -1388,7 +1388,7 @@ exports.push([module.id, \\"@import url();\\\\n@import url('');\\\\n@import url( exports[`"import" option should work with a value equal to "true": result 1`] = ` Array [ Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1396,7 +1396,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1404,7 +1404,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1412,7 +1412,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1420,7 +1420,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1428,7 +1428,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1436,7 +1436,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1444,7 +1444,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1452,7 +1452,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1460,7 +1460,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1468,7 +1468,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1476,7 +1476,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1484,7 +1484,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1492,7 +1492,7 @@ Array [ "screen and (orientation: landscape)", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1500,7 +1500,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1508,7 +1508,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test-nested-media.css", + "../../src/index.js?[ident]!./import/test-nested-media.css", "a { b: b; } @@ -1516,7 +1516,7 @@ Array [ "screen and (orientation:landscape) and (min-width: 100px)", ], Array [ - "../../src/index.js?!./import/test-media.css", + "../../src/index.js?[ident]!./import/test-media.css", ".test { c: c; } @@ -1524,7 +1524,7 @@ Array [ "screen and (orientation:landscape)", ], Array [ - "../../src/index.js?!./import/test-other.css", + "../../src/index.js?[ident]!./import/test-other.css", ".test { d: d; } @@ -1566,7 +1566,7 @@ Array [ "@import url(//example.com/style.css);", ], Array [ - "../../src/index.js?!./import/node_modules/package/test.css", + "../../src/index.js?[ident]!./import/node_modules/package/test.css", ".test { d: d } @@ -1574,7 +1574,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/query.css?foo=1&bar=1", + "../../src/index.js?[ident]!./import/query.css?foo=1&bar=1", ".query { e: e; } @@ -1582,7 +1582,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/other-query.css?foo=1&bar=1#hash", + "../../src/index.js?[ident]!./import/other-query.css?foo=1&bar=1#hash", ".other-query { f: f; } @@ -1590,7 +1590,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/other-query.css?foo=1&bar=1#hash", + "../../src/index.js?[ident]!./import/other-query.css?foo=1&bar=1#hash", ".other-query { f: f; } @@ -1610,7 +1610,7 @@ Array [ "@import url(https://fonts.googleapis.com/css?family=Noto+Sans+TC|Roboto);", ], Array [ - "../../src/index.js?!./import/relative.css", + "../../src/index.js?[ident]!./import/relative.css", ".relative { color: red; } @@ -1618,7 +1618,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/top-relative.css", + "../../src/index.js?[ident]!./import/top-relative.css", ".top-relative { color: black; } @@ -1626,7 +1626,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/node_modules/package/tilde.css", + "../../src/index.js?[ident]!./import/node_modules/package/tilde.css", ".tilde { color: yellow; } @@ -1634,7 +1634,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/alias.css", + "../../src/index.js?[ident]!./import/alias.css", ".alias { color: red; } @@ -1642,7 +1642,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/url.css", + "../../src/index.js?[ident]!./import/url.css", ".background-imported { background: url(/webpack/public/path/img.png); } @@ -1650,7 +1650,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1658,7 +1658,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1666,7 +1666,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1674,7 +1674,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1682,7 +1682,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1690,7 +1690,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -1698,7 +1698,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -1706,7 +1706,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -1714,7 +1714,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/te'st.css", + "../../src/index.js?[ident]!./import/te'st.css", ".strange { color: red; } @@ -1722,7 +1722,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1730,7 +1730,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1738,7 +1738,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1746,7 +1746,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1754,7 +1754,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1762,7 +1762,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1770,7 +1770,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1778,7 +1778,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1786,7 +1786,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1794,7 +1794,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } @@ -1802,7 +1802,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1810,7 +1810,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1818,7 +1818,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1826,7 +1826,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1834,7 +1834,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1842,7 +1842,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test test.css", + "../../src/index.js?[ident]!./import/test test.css", ".space { color: gray; } @@ -1850,7 +1850,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./import/test.css", + "../../src/index.js?[ident]!./import/test.css", ".test { a: a; } diff --git a/test/__snapshots__/importLoaders-option.test.js.snap b/test/__snapshots__/importLoaders-option.test.js.snap index c009faec..2e573e56 100644 --- a/test/__snapshots__/importLoaders-option.test.js.snap +++ b/test/__snapshots__/importLoaders-option.test.js.snap @@ -43,7 +43,7 @@ exports[`"importLoaders" option should work with a value equal to "0" (\`postcss exports[`"importLoaders" option should work with a value equal to "0" (\`postcss-loader\` before): module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4-rules-0!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); // Module @@ -54,7 +54,7 @@ exports.push([module.id, \\".foo {\\\\n color: red;\\\\n color: rgba(0, 0, 255 exports[`"importLoaders" option should work with a value equal to "0" (\`postcss-loader\` before): result 1`] = ` Array [ Array [ - "../../src/index.js?!./nested-import/imported.css", + "../../src/index.js?[ident]!./nested-import/imported.css", ".bar { color: blue; color: rgb(0 0 100% / 90%); @@ -81,7 +81,7 @@ exports[`"importLoaders" option should work with a value equal to "1" ("postcss- exports[`"importLoaders" option should work with a value equal to "1" ("postcss-loader" before): module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4-rules-0!../../../node_modules/postcss-loader/src/index.js??ref--4-rules-1!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); // Module @@ -92,7 +92,7 @@ exports.push([module.id, \\".foo {\\\\n color: red;\\\\n color: rgba(0, 0, 255 exports[`"importLoaders" option should work with a value equal to "1" ("postcss-loader" before): result 1`] = ` Array [ Array [ - "../../src/index.js?!../../node_modules/postcss-loader/src/index.js?!./nested-import/imported.css", + "../../src/index.js?[ident]!./nested-import/imported.css", ".bar { color: blue; color: rgba(0, 0, 255, 0.9); @@ -119,7 +119,7 @@ exports[`"importLoaders" option should work with a value equal to "1" (no loader exports[`"importLoaders" option should work with a value equal to "1" (no loaders before): module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); // Module @@ -130,7 +130,7 @@ exports.push([module.id, \\".foo {\\\\n color: red;\\\\n color: rgb(0 0 100% / exports[`"importLoaders" option should work with a value equal to "1" (no loaders before): result 1`] = ` Array [ Array [ - "../../src/index.js?!./nested-import/imported.css", + "../../src/index.js?[ident]!./nested-import/imported.css", ".bar { color: blue; color: rgb(0 0 100% / 90%); @@ -157,7 +157,7 @@ exports[`"importLoaders" option should work with a value equal to "2" ("postcss- exports[`"importLoaders" option should work with a value equal to "2" ("postcss-loader" before): module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4-rules-0!../../../node_modules/postcss-loader/src/index.js??ref--4-rules-1!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); // Module @@ -168,7 +168,7 @@ exports.push([module.id, \\".foo {\\\\n color: red;\\\\n color: rgba(0, 0, 255 exports[`"importLoaders" option should work with a value equal to "2" ("postcss-loader" before): result 1`] = ` Array [ Array [ - "../../src/index.js?!../../node_modules/postcss-loader/src/index.js?!./nested-import/imported.css", + "../../src/index.js?[ident]!./nested-import/imported.css", ".bar { color: blue; color: rgba(0, 0, 255, 0.9); diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index f62d14af..005a280e 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -175,7 +175,7 @@ exports[`loader should work with empty options: errors 1`] = `Array []`; exports[`loader should work with empty options: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../src/index.js??[ident]!./imported.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./url/img.png\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); @@ -189,7 +189,7 @@ exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */ exports[`loader should work with empty options: result 1`] = ` Array [ Array [ - "../../src/index.js?!./imported.css", + "../../src/index.js?[ident]!./imported.css", ".foo { color: red; } @@ -346,7 +346,7 @@ exports[`loader should work: errors 1`] = `Array []`; exports[`loader should work: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../src/index.js??[ident]!./imported.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./url/img.png\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); @@ -360,7 +360,7 @@ exports.push([module.id, \\"@charset \\\\\\"UTF-8\\\\\\";\\\\n\\\\n/* Comment */ exports[`loader should work: result 1`] = ` Array [ Array [ - "../../src/index.js?!./imported.css", + "../../src/index.js?[ident]!./imported.css", ".foo { color: red; } diff --git a/test/__snapshots__/modules-option.test.js.snap b/test/__snapshots__/modules-option.test.js.snap index 0598da1c..baf5825a 100644 --- a/test/__snapshots__/modules-option.test.js.snap +++ b/test/__snapshots__/modules-option.test.js.snap @@ -40,7 +40,7 @@ exports[`"modules" option issue #636: errors 1`] = `Array []`; exports[`"modules" option issue #636: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4-rules-0!../../../../node_modules/sass-loader/dist/cjs.js??ref--4-rules-1!./foo.scss\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./foo.scss\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -54,7 +54,7 @@ exports.locals = { exports[`"modules" option issue #636: result 1`] = ` Array [ Array [ - "../../src/index.js?!../../node_modules/sass-loader/dist/cjs.js?!./modules/issue-636/foo.scss", + "../../src/index.js?[ident]!./modules/issue-636/foo.scss", ".prefix-foo { color: red; }", @@ -76,8 +76,8 @@ exports[`"modules" option issue #861: errors 1`] = `Array []`; exports[`"modules" option issue #861: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4!./node_modules/@localpackage/color.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??ref--4!./node_modules/@localpackage/style.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./node_modules/@localpackage/color.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??[ident]!./node_modules/@localpackage/style.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -93,13 +93,13 @@ exports.locals = { exports[`"modules" option issue #861: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/issue-861/node_modules/@localpackage/color.css", + "../../src/index.js?[ident]!./modules/issue-861/node_modules/@localpackage/color.css", " ", "", ], Array [ - "../../src/index.js?!./modules/issue-861/node_modules/@otherlocalpackage/style.css", + "../../src/index.js?[ident]!./modules/issue-861/node_modules/@otherlocalpackage/style.css", "._3_UmHSyGSKHfkAuB_4PF0r { display: flex; } @@ -107,7 +107,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/issue-861/node_modules/@localpackage/style.css", + "../../src/index.js?[ident]!./modules/issue-861/node_modules/@localpackage/style.css", "._3tsKb6RyTte_M89z1nGia_ { color: red; margin: 0; @@ -354,7 +354,7 @@ exports[`"modules" option should avoid unnecessary "require": errors 1`] = `Arra exports[`"modules" option should avoid unnecessary "require": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4!./imported-simple.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./imported-simple.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -369,7 +369,7 @@ exports.locals = { exports[`"modules" option should avoid unnecessary "require": result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/composes/imported-simple.css", + "../../src/index.js?[ident]!./modules/composes/imported-simple.css", "._15HqoDBChWnuDGxJ6jOtUV { display: block; } @@ -398,8 +398,8 @@ exports[`"modules" option should keep order: errors 1`] = `Array []`; exports[`"modules" option should keep order: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4!./order-1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??ref--4!./order-2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./order-1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??[ident]!./order-2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -415,7 +415,7 @@ exports.locals = { exports[`"modules" option should keep order: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/order/order-1.css", + "../../src/index.js?[ident]!./modules/order/order-1.css", "._2r9YTNQEwCk0bSiZCuc7Ol { color: red; } @@ -427,7 +427,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/order/order-2.css", + "../../src/index.js?[ident]!./modules/order/order-2.css", "._18ve634MAK3QtupmRo9lo3 { color: blue; } @@ -830,14 +830,14 @@ exports[`"modules" option should support resolving in composes: errors 1`] = `Ar exports[`"modules" option should support resolving in composes: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4!./values.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??ref--4!./something.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_2___ = require(\\"-!../../../../src/index.js??ref--4!./imported-simple.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_3___ = require(\\"-!../../../../src/index.js??ref--4!./relative.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_4___ = require(\\"-!../../../../src/index.js??ref--4!./top-relative.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_5___ = require(\\"-!../../../../src/index.js??ref--4!../issue-861/node_modules/package/style.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_6___ = require(\\"-!../../../../src/index.js??ref--4!aliasesComposes/alias.css\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4!./test-other.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./values.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??[ident]!./something.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_2___ = require(\\"-!../../../../src/index.js??[ident]!./imported-simple.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_3___ = require(\\"-!../../../../src/index.js??[ident]!./relative.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_4___ = require(\\"-!../../../../src/index.js??[ident]!./top-relative.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_5___ = require(\\"-!../../../../src/index.js??[ident]!../issue-861/node_modules/package/style.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_6___ = require(\\"-!../../../../src/index.js??[ident]!aliasesComposes/alias.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./test-other.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"../../url/img.png\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); @@ -904,19 +904,19 @@ exports.locals = { exports[`"modules" option should support resolving in composes: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/composes/values.css", + "../../src/index.js?[ident]!./modules/composes/values.css", " ", "", ], Array [ - "../../src/index.js?!./modules/composes/something.css", + "../../src/index.js?[ident]!./modules/composes/something.css", " ", "", ], Array [ - "../../src/index.js?!./modules/composes/imported-simple.css", + "../../src/index.js?[ident]!./modules/composes/imported-simple.css", "._15HqoDBChWnuDGxJ6jOtUV { display: block; } @@ -924,7 +924,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/composes/relative.css", + "../../src/index.js?[ident]!./modules/composes/relative.css", "._2XpGrQ60AX7p8fQT9hACyH { display: inline; } @@ -932,7 +932,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/composes/top-relative.css", + "../../src/index.js?[ident]!./modules/composes/top-relative.css", "._1Ua1iZV27bUg7cs1NExheb { display: flex; } @@ -940,7 +940,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/issue-861/node_modules/package/style.css", + "../../src/index.js?[ident]!./modules/issue-861/node_modules/package/style.css", ".HM73Ud1_EQz1eaYocwagZ { display: inline-block; } @@ -948,7 +948,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/composes/alias.css", + "../../src/index.js?[ident]!./modules/composes/alias.css", "._1qxfPu6Vbru-xS0LA5GWJT { display: table; } @@ -956,7 +956,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/composes/test-other.css", + "../../src/index.js?[ident]!./modules/composes/test-other.css", "._2KbNYW68v_VxbQ8XdpUuGh { d: d; } @@ -3848,7 +3848,7 @@ exports[`"modules" option should work with case \`composes-1\` (\`modules\` valu exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -3864,7 +3864,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-1/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-1/file.css", "._1xYJRliqpSHYzUvktbdaCo { color: red; } @@ -3897,7 +3897,7 @@ exports[`"modules" option should work with case \`composes-1\` (\`modules\` valu exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -3913,7 +3913,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-1/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-1/file.css", "._1xYJRliqpSHYzUvktbdaCo { color: red; } @@ -3946,7 +3946,7 @@ exports[`"modules" option should work with case \`composes-1\` (\`modules\` valu exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -3962,7 +3962,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-1/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-1/file.css", "._c2 { color: red; } @@ -3995,7 +3995,7 @@ exports[`"modules" option should work with case \`composes-1\` (\`modules\` valu exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4011,7 +4011,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-1/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-1/file.css", "._c2 { color: red; } @@ -4044,7 +4044,7 @@ exports[`"modules" option should work with case \`composes-1\` (\`modules\` valu exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4060,7 +4060,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-1\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-1/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-1/file.css", "._1xYJRliqpSHYzUvktbdaCo { color: red; } @@ -4119,7 +4119,7 @@ exports[`"modules" option should work with case \`composes-2\` (\`modules\` valu exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4135,7 +4135,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-2/file.css", "._3CxjkH18CkEkRZ4FO4v-NQ { color: red; } @@ -4168,7 +4168,7 @@ exports[`"modules" option should work with case \`composes-2\` (\`modules\` valu exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4184,7 +4184,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-2/file.css", "._3CxjkH18CkEkRZ4FO4v-NQ { color: red; } @@ -4217,7 +4217,7 @@ exports[`"modules" option should work with case \`composes-2\` (\`modules\` valu exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4233,7 +4233,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-2/file.css", "._c-2 { color: red; } @@ -4266,7 +4266,7 @@ exports[`"modules" option should work with case \`composes-2\` (\`modules\` valu exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4282,7 +4282,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-2/file.css", "._c-2 { color: red; } @@ -4315,7 +4315,7 @@ exports[`"modules" option should work with case \`composes-2\` (\`modules\` valu exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4331,7 +4331,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-2\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-2/file.css", "._3CxjkH18CkEkRZ4FO4v-NQ { color: red; } @@ -4391,8 +4391,8 @@ exports[`"modules" option should work with case \`composes-multiple\` (\`modules exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -4407,7 +4407,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file1.css", "._3hEvHUTrMHercKPgTBsK6W { color: red; } @@ -4415,7 +4415,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file2.css", "._1UYEX_kWsPgokwmdBHI8pU { color: blue; } @@ -4439,8 +4439,8 @@ exports[`"modules" option should work with case \`composes-multiple\` (\`modules exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -4455,7 +4455,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file1.css", "._3hEvHUTrMHercKPgTBsK6W { color: red; } @@ -4463,7 +4463,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file2.css", "._1UYEX_kWsPgokwmdBHI8pU { color: blue; } @@ -4487,8 +4487,8 @@ exports[`"modules" option should work with case \`composes-multiple\` (\`modules exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -4503,7 +4503,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file1.css", "._def1 { color: red; } @@ -4511,7 +4511,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file2.css", "._def2 { color: blue; } @@ -4535,8 +4535,8 @@ exports[`"modules" option should work with case \`composes-multiple\` (\`modules exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -4551,7 +4551,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file1.css", "._def1 { color: red; } @@ -4559,7 +4559,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file2.css", "._def2 { color: blue; } @@ -4583,8 +4583,8 @@ exports[`"modules" option should work with case \`composes-multiple\` (\`modules exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -4599,7 +4599,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-multiple\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file1.css", "._3hEvHUTrMHercKPgTBsK6W { color: red; } @@ -4607,7 +4607,7 @@ Array [ "", ], Array [ - "../../src/index.js?!./modules/tests-cases/composes-multiple/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-multiple/file2.css", "._1UYEX_kWsPgokwmdBHI8pU { color: blue; } @@ -4657,7 +4657,7 @@ exports[`"modules" option should work with case \`composes-with-importing\` (\`m exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4671,7 +4671,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-with-importing/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-with-importing/file.css", ".zu3DT3PNuTYdVravHX310 { color: red; } @@ -4695,7 +4695,7 @@ exports[`"modules" option should work with case \`composes-with-importing\` (\`m exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4709,7 +4709,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-with-importing/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-with-importing/file.css", ".zu3DT3PNuTYdVravHX310 { color: red; } @@ -4733,7 +4733,7 @@ exports[`"modules" option should work with case \`composes-with-importing\` (\`m exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4747,7 +4747,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-with-importing/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-with-importing/file.css", "._def { color: red; } @@ -4771,7 +4771,7 @@ exports[`"modules" option should work with case \`composes-with-importing\` (\`m exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4785,7 +4785,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-with-importing/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-with-importing/file.css", "._def { color: red; } @@ -4809,7 +4809,7 @@ exports[`"modules" option should work with case \`composes-with-importing\` (\`m exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -4823,7 +4823,7 @@ exports.locals = { exports[`"modules" option should work with case \`composes-with-importing\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/composes-with-importing/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/composes-with-importing/file.css", ".zu3DT3PNuTYdVravHX310 { color: red; } @@ -7031,7 +7031,7 @@ exports[`"modules" option should work with case \`media-2\` (\`modules\` value i exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -7045,7 +7045,7 @@ exports.locals = { exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/media-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/media-2/file.css", " ", "", @@ -7070,7 +7070,7 @@ exports[`"modules" option should work with case \`media-2\` (\`modules\` value i exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -7085,7 +7085,7 @@ exports.locals = { exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/media-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/media-2/file.css", " ", "", @@ -7110,7 +7110,7 @@ exports[`"modules" option should work with case \`media-2\` (\`modules\` value i exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -7124,7 +7124,7 @@ exports.locals = { exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/media-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/media-2/file.css", " ", "", @@ -7149,7 +7149,7 @@ exports[`"modules" option should work with case \`media-2\` (\`modules\` value i exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -7164,7 +7164,7 @@ exports.locals = { exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/media-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/media-2/file.css", " ", "", @@ -7189,7 +7189,7 @@ exports[`"modules" option should work with case \`media-2\` (\`modules\` value i exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -7204,7 +7204,7 @@ exports.locals = { exports[`"modules" option should work with case \`media-2\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/media-2/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/media-2/file.css", " ", "", @@ -8472,7 +8472,7 @@ exports[`"modules" option should work with case \`values-3\` (\`modules\` value exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8486,7 +8486,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-3/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-3/file.css", " ", "", @@ -8507,7 +8507,7 @@ exports[`"modules" option should work with case \`values-3\` (\`modules\` value exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8522,7 +8522,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-3/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-3/file.css", " ", "", @@ -8543,7 +8543,7 @@ exports[`"modules" option should work with case \`values-3\` (\`modules\` value exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8557,7 +8557,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-3/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-3/file.css", " ", "", @@ -8578,7 +8578,7 @@ exports[`"modules" option should work with case \`values-3\` (\`modules\` value exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8593,7 +8593,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-3/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-3/file.css", " ", "", @@ -8614,7 +8614,7 @@ exports[`"modules" option should work with case \`values-3\` (\`modules\` value exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8629,7 +8629,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-3\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-3/file.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-3/file.css", " ", "", @@ -8676,8 +8676,8 @@ exports[`"modules" option should work with case \`values-4\` (\`modules\` value exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -8693,13 +8693,13 @@ exports.locals = { exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file1.css", " ", "", ], Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file2.css", " ", "", @@ -8720,8 +8720,8 @@ exports[`"modules" option should work with case \`values-4\` (\`modules\` value exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -8738,13 +8738,13 @@ exports.locals = { exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file1.css", " ", "", ], Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file2.css", " ", "", @@ -8765,8 +8765,8 @@ exports[`"modules" option should work with case \`values-4\` (\`modules\` value exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -8782,13 +8782,13 @@ exports.locals = { exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file1.css", " ", "", ], Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file2.css", " ", "", @@ -8809,8 +8809,8 @@ exports[`"modules" option should work with case \`values-4\` (\`modules\` value exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -8827,13 +8827,13 @@ exports.locals = { exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file1.css", " ", "", ], Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file2.css", " ", "", @@ -8854,8 +8854,8 @@ exports[`"modules" option should work with case \`values-4\` (\`modules\` value exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??ref--4!./file2.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../../src/index.js??[ident]!./file2.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); exports.i(___CSS_LOADER_ICSS_IMPORT_1___); @@ -8872,13 +8872,13 @@ exports.locals = { exports[`"modules" option should work with case \`values-4\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file1.css", " ", "", ], Array [ - "../../src/index.js?!./modules/tests-cases/values-4/file2.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-4/file2.css", " ", "", @@ -8925,7 +8925,7 @@ exports[`"modules" option should work with case \`values-5\` (\`modules\` value exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8940,7 +8940,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-5/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-5/file1.css", " ", "", @@ -8961,7 +8961,7 @@ exports[`"modules" option should work with case \`values-5\` (\`modules\` value exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -8977,7 +8977,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-5/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-5/file1.css", " ", "", @@ -8998,7 +8998,7 @@ exports[`"modules" option should work with case \`values-5\` (\`modules\` value exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9013,7 +9013,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-5/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-5/file1.css", " ", "", @@ -9034,7 +9034,7 @@ exports[`"modules" option should work with case \`values-5\` (\`modules\` value exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9050,7 +9050,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-5/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-5/file1.css", " ", "", @@ -9071,7 +9071,7 @@ exports[`"modules" option should work with case \`values-5\` (\`modules\` value exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9087,7 +9087,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-5\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-5/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-5/file1.css", " ", "", @@ -9134,7 +9134,7 @@ exports[`"modules" option should work with case \`values-6\` (\`modules\` value exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9149,7 +9149,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-6/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-6/file1.css", " ", "", @@ -9170,7 +9170,7 @@ exports[`"modules" option should work with case \`values-6\` (\`modules\` value exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9186,7 +9186,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-6/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-6/file1.css", " ", "", @@ -9207,7 +9207,7 @@ exports[`"modules" option should work with case \`values-6\` (\`modules\` value exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9222,7 +9222,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-6/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-6/file1.css", " ", "", @@ -9243,7 +9243,7 @@ exports[`"modules" option should work with case \`values-6\` (\`modules\` value exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9259,7 +9259,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-6/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-6/file1.css", " ", "", @@ -9280,7 +9280,7 @@ exports[`"modules" option should work with case \`values-6\` (\`modules\` value exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9296,7 +9296,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-6\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-6/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-6/file1.css", " ", "", @@ -9343,7 +9343,7 @@ exports[`"modules" option should work with case \`values-7\` (\`modules\` value exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9358,7 +9358,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-7/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-7/file1.css", " ", "", @@ -9379,7 +9379,7 @@ exports[`"modules" option should work with case \`values-7\` (\`modules\` value exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9395,7 +9395,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-7/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-7/file1.css", " ", "", @@ -9416,7 +9416,7 @@ exports[`"modules" option should work with case \`values-7\` (\`modules\` value exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`object with mode global)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9431,7 +9431,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`object with mode global)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-7/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-7/file1.css", " ", "", @@ -9452,7 +9452,7 @@ exports[`"modules" option should work with case \`values-7\` (\`modules\` value exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`object with mode local)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9468,7 +9468,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`object with mode local)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-7/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-7/file1.css", " ", "", @@ -9489,7 +9489,7 @@ exports[`"modules" option should work with case \`values-7\` (\`modules\` value exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`true)\`: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../../../src/runtime/api.js\\"); -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??ref--4!./file1.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../../src/index.js??[ident]!./file1.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_ICSS_IMPORT_0___); // Module @@ -9505,7 +9505,7 @@ exports.locals = { exports[`"modules" option should work with case \`values-7\` (\`modules\` value is \`true)\`: result 1`] = ` Array [ Array [ - "../../src/index.js?!./modules/tests-cases/values-7/file1.css", + "../../src/index.js?[ident]!./modules/tests-cases/values-7/file1.css", " ", "", diff --git a/test/__snapshots__/onlyLocals-option.test.js.snap b/test/__snapshots__/onlyLocals-option.test.js.snap index 878d0d39..85a5a955 100644 --- a/test/__snapshots__/onlyLocals-option.test.js.snap +++ b/test/__snapshots__/onlyLocals-option.test.js.snap @@ -4,13 +4,13 @@ exports[`"onlyLocals" option should work: errors 1`] = `Array []`; exports[`"onlyLocals" option should work: module 1`] = ` "// Imports -var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??ref--4!./values.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??ref--4!./something.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_2___ = require(\\"-!../../../../src/index.js??ref--4!./imported-simple.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_3___ = require(\\"-!../../../../src/index.js??ref--4!./relative.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_4___ = require(\\"-!../../../../src/index.js??ref--4!./top-relative.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_5___ = require(\\"-!../../../../src/index.js??ref--4!../issue-861/node_modules/package/style.css\\"); -var ___CSS_LOADER_ICSS_IMPORT_6___ = require(\\"-!../../../../src/index.js??ref--4!aliasesComposes/alias.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_0___ = require(\\"-!../../../../src/index.js??[ident]!./values.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_1___ = require(\\"-!../../../../src/index.js??[ident]!./something.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_2___ = require(\\"-!../../../../src/index.js??[ident]!./imported-simple.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_3___ = require(\\"-!../../../../src/index.js??[ident]!./relative.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_4___ = require(\\"-!../../../../src/index.js??[ident]!./top-relative.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_5___ = require(\\"-!../../../../src/index.js??[ident]!../issue-861/node_modules/package/style.css\\"); +var ___CSS_LOADER_ICSS_IMPORT_6___ = require(\\"-!../../../../src/index.js??[ident]!aliasesComposes/alias.css\\"); // Exports module.exports = { \\"v-def\\": \\"\\" + ___CSS_LOADER_ICSS_IMPORT_0___[\\"v-def\\"] + \\"\\", diff --git a/test/__snapshots__/url-option.test.js.snap b/test/__snapshots__/url-option.test.js.snap index 16a57fab..8cd1fb6c 100644 --- a/test/__snapshots__/url-option.test.js.snap +++ b/test/__snapshots__/url-option.test.js.snap @@ -5,7 +5,7 @@ exports[`"url" option should work when not specified: errors 1`] = `Array []`; exports[`"url" option should work when not specified: module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\"); var ___CSS_LOADER_URL_IMPORT_1___ = require(\\"package/img.png\\"); @@ -81,7 +81,7 @@ exports.push([module.id, \\".class {\\\\n background: url(\\" + ___CSS_LOADER_U exports[`"url" option should work when not specified: result 1`] = ` Array [ Array [ - "../../src/index.js?!./url/imported.css", + "../../src/index.js?[ident]!./url/imported.css", ".bar { background: url(/webpack/public/path/img-from-imported.png); } @@ -507,7 +507,7 @@ exports[`"url" option should work with a value equal to "Function": errors 1`] = exports[`"url" option should work with a value equal to "Function": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./font.woff\\"); var ___CSS_LOADER_URL_IMPORT_1___ = require(\\"./font.woff2\\"); @@ -554,7 +554,7 @@ exports.push([module.id, \\".class {\\\\n background: url('./img.png');\\\\n}\\ exports[`"url" option should work with a value equal to "Function": result 1`] = ` Array [ Array [ - "../../src/index.js?!./url/imported.css", + "../../src/index.js?[ident]!./url/imported.css", ".bar { background: url(/webpack/public/path/img-from-imported.png); } @@ -985,7 +985,7 @@ exports[`"url" option should work with a value equal to "false": errors 1`] = `A exports[`"url" option should work with a value equal to "false": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); // Module @@ -996,7 +996,7 @@ exports.push([module.id, \\".class {\\\\n background: url('./img.png');\\\\n}\\ exports[`"url" option should work with a value equal to "false": result 1`] = ` Array [ Array [ - "../../src/index.js?!./url/imported.css", + "../../src/index.js?[ident]!./url/imported.css", ".bar { background: url('./img-from-imported.png'); } @@ -1361,7 +1361,7 @@ exports[`"url" option should work with a value equal to "true": errors 1`] = `Ar exports[`"url" option should work with a value equal to "true": module 1`] = ` "// Imports var ___CSS_LOADER_API_IMPORT___ = require(\\"../../../src/runtime/api.js\\"); -var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??ref--4!./imported.css\\"); +var ___CSS_LOADER_AT_RULE_IMPORT_0___ = require(\\"-!../../../src/index.js??[ident]!./imported.css\\"); var ___CSS_LOADER_GET_URL_IMPORT___ = require(\\"../../../src/runtime/getUrl.js\\"); var ___CSS_LOADER_URL_IMPORT_0___ = require(\\"./img.png\\"); var ___CSS_LOADER_URL_IMPORT_1___ = require(\\"package/img.png\\"); @@ -1437,7 +1437,7 @@ exports.push([module.id, \\".class {\\\\n background: url(\\" + ___CSS_LOADER_U exports[`"url" option should work with a value equal to "true": result 1`] = ` Array [ Array [ - "../../src/index.js?!./url/imported.css", + "../../src/index.js?[ident]!./url/imported.css", ".bar { background: url(/webpack/public/path/img-from-imported.png); } diff --git a/test/helpers/getCompiler.js b/test/helpers/getCompiler.js index 13eb2bd5..25b0490e 100644 --- a/test/helpers/getCompiler.js +++ b/test/helpers/getCompiler.js @@ -19,8 +19,12 @@ export default (fixture, loaderOptions = {}, config = {}) => { rules: [ { test: /\.css$/i, - loader: path.resolve(__dirname, '../../src'), - options: loaderOptions || {}, + use: [ + { + loader: path.resolve(__dirname, '../../src'), + options: loaderOptions || {}, + }, + ], }, { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/, diff --git a/test/helpers/getExecutedCode.js b/test/helpers/getExecutedCode.js new file mode 100644 index 00000000..d2d0b24d --- /dev/null +++ b/test/helpers/getExecutedCode.js @@ -0,0 +1,17 @@ +import { execute, readAsset } from './index'; + +export default (asset, compiler, stats) => { + let executed = execute(readAsset(asset, compiler, stats)); + + if (Array.isArray(executed)) { + executed = executed.map((module) => { + // Todo remove after drop webpack@4 + // eslint-disable-next-line no-param-reassign + module[0] = module[0].replace(/\?.*!/g, '?[ident]!'); + + return module; + }); + } + + return executed; +}; diff --git a/test/helpers/getModuleSource.js b/test/helpers/getModuleSource.js index fd36a3fc..fd60583b 100644 --- a/test/helpers/getModuleSource.js +++ b/test/helpers/getModuleSource.js @@ -1,6 +1,10 @@ export default (id, stats) => { const { modules } = stats.toJson({ source: true }); const module = modules.find((m) => m.id === id); + let { source } = module; - return module.source; + // Todo remove after drop webpack@4 support + source = source.replace(/\?\?.*!/g, '??[ident]!'); + + return source; }; diff --git a/test/helpers/index.js b/test/helpers/index.js index 0ec62aed..1dbb72f0 100644 --- a/test/helpers/index.js +++ b/test/helpers/index.js @@ -2,6 +2,7 @@ import compile from './compile'; import execute from './execute'; import getCompiler from './getCompiler'; import getErrors from './getErrors'; +import getExecutedCode from './getExecutedCode'; import getModuleSource from './getModuleSource'; import getWarnings from './getWarnings'; import normalizeErrors from './normalizeErrors'; @@ -13,6 +14,7 @@ export { execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, normalizeErrors, diff --git a/test/icss.test.js b/test/icss.test.js index ae676b40..97a30650 100644 --- a/test/icss.test.js +++ b/test/icss.test.js @@ -3,12 +3,11 @@ import fs from 'fs'; import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; const testCasesPath = path.join(__dirname, 'fixtures/icss/tests-cases'); @@ -24,7 +23,7 @@ describe('ICSS', () => { getModuleSource(`./icss/tests-cases/${name}/source.css`, stats) ).toMatchSnapshot('module'); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); diff --git a/test/import-option.test.js b/test/import-option.test.js index 1d85906e..74e52e7f 100644 --- a/test/import-option.test.js +++ b/test/import-option.test.js @@ -1,11 +1,10 @@ import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('"import" option', () => { @@ -16,9 +15,9 @@ describe('"import" option', () => { expect(getModuleSource('./import/import.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -30,9 +29,9 @@ describe('"import" option', () => { expect(getModuleSource('./import/import.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -44,9 +43,9 @@ describe('"import" option', () => { expect(getModuleSource('./import/import.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -69,9 +68,9 @@ describe('"import" option', () => { expect(getModuleSource('./import/import.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -83,9 +82,9 @@ describe('"import" option', () => { expect(getModuleSource('./import/order.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); diff --git a/test/importLoaders-option.test.js b/test/importLoaders-option.test.js index 63eb2bcf..96a2929a 100644 --- a/test/importLoaders-option.test.js +++ b/test/importLoaders-option.test.js @@ -4,12 +4,11 @@ import postcssPresetEnv from 'postcss-preset-env'; import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('"importLoaders" option', () => { @@ -40,9 +39,9 @@ describe('"importLoaders" option', () => { expect( getModuleSource('./nested-import/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -57,7 +56,7 @@ describe('"importLoaders" option', () => { rules: [ { test: /\.css$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { importLoaders: 0 }, @@ -77,9 +76,9 @@ describe('"importLoaders" option', () => { expect( getModuleSource('./nested-import/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -91,9 +90,9 @@ describe('"importLoaders" option', () => { expect( getModuleSource('./nested-import/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -108,7 +107,7 @@ describe('"importLoaders" option', () => { rules: [ { test: /\.css$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { importLoaders: 1 }, @@ -128,9 +127,9 @@ describe('"importLoaders" option', () => { expect( getModuleSource('./nested-import/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -145,7 +144,7 @@ describe('"importLoaders" option', () => { rules: [ { test: /\.css$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { importLoaders: 2 }, @@ -165,9 +164,9 @@ describe('"importLoaders" option', () => { expect( getModuleSource('./nested-import/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); diff --git a/test/loader.test.js b/test/loader.test.js index 1ebc0e3d..40af0f9b 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -4,12 +4,11 @@ import postcssPresetEnv from 'postcss-preset-env'; import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('loader', () => { @@ -18,9 +17,9 @@ describe('loader', () => { const stats = await compile(compiler); expect(getModuleSource('./basic.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -30,9 +29,9 @@ describe('loader', () => { const stats = await compile(compiler); expect(getModuleSource('./empty.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -42,9 +41,9 @@ describe('loader', () => { const stats = await compile(compiler); expect(getModuleSource('./basic.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -112,9 +111,9 @@ describe('loader', () => { expect( getModuleSource('./postcss-present-env/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -148,9 +147,9 @@ describe('loader', () => { expect(getModuleSource('./scss/source.scss', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -178,7 +177,12 @@ describe('loader', () => { ); const stats = await compile(compiler); - expect(stats.compilation.modules.length).toBe(6); + if (stats.compilation.modules.size) { + expect(stats.compilation.modules.size).toBe(11); + } else { + expect(stats.compilation.modules.length).toBe(6); + } + expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -206,7 +210,12 @@ describe('loader', () => { ); const stats = await compile(compiler); - expect(stats.compilation.modules.length).toBe(6); + if (stats.compilation.modules.size) { + expect(stats.compilation.modules.size).toBe(10); + } else { + expect(stats.compilation.modules.length).toBe(6); + } + expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); diff --git a/test/localsConvention-option.test.js b/test/localsConvention-option.test.js index 2cb00853..ad62de97 100644 --- a/test/localsConvention-option.test.js +++ b/test/localsConvention-option.test.js @@ -1,11 +1,10 @@ import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('"localsConvention" option', () => { @@ -21,9 +20,9 @@ describe('"localsConvention" option', () => { expect( getModuleSource('./modules/localsConvention/localsConvention.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -41,9 +40,9 @@ describe('"localsConvention" option', () => { expect( getModuleSource('./modules/localsConvention/localsConvention.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -61,9 +60,9 @@ describe('"localsConvention" option', () => { expect( getModuleSource('./modules/localsConvention/localsConvention.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -81,9 +80,9 @@ describe('"localsConvention" option', () => { expect( getModuleSource('./modules/localsConvention/localsConvention.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -101,9 +100,9 @@ describe('"localsConvention" option', () => { expect( getModuleSource('./modules/localsConvention/localsConvention.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -121,9 +120,9 @@ describe('"localsConvention" option', () => { expect( getModuleSource('./modules/localsConvention/localsConvention.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); diff --git a/test/modules-option.test.js b/test/modules-option.test.js index 6ce59a41..d16e5927 100644 --- a/test/modules-option.test.js +++ b/test/modules-option.test.js @@ -3,12 +3,11 @@ import fs from 'fs'; import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; const testCasesPath = path.join(__dirname, 'fixtures/modules/tests-cases'); @@ -42,7 +41,7 @@ describe('"modules" option', () => { expect(getModuleSource(moduleId, stats)).toMatchSnapshot('module'); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -57,9 +56,9 @@ describe('"modules" option', () => { expect(getModuleSource('./modules/pure/pure.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -73,9 +72,9 @@ describe('"modules" option', () => { expect(getModuleSource('./modules/pure/pure.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -89,9 +88,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -108,9 +107,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -127,9 +126,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -146,9 +145,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -165,9 +164,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -181,9 +180,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -197,9 +196,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -213,9 +212,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -229,9 +228,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -263,9 +262,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -287,9 +286,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -306,9 +305,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/localIdentName/localIdentName.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -322,9 +321,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/composes/composes.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -365,9 +364,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/issue-286/source.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -381,7 +380,7 @@ describe('"modules" option', () => { rules: [ { test: /\.s[ca]ss$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { @@ -411,9 +410,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/issue-636/source.scss', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -433,9 +432,9 @@ describe('"modules" option', () => { stats ) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -451,9 +450,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/issue-966/button.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -471,9 +470,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/issue-967/path-placeholder.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -495,9 +494,9 @@ describe('"modules" option', () => { stats ) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -514,9 +513,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/issue-995/issue-995.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -530,9 +529,9 @@ describe('"modules" option', () => { expect( getModuleSource('./modules/composes/composes-duplicate.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -544,9 +543,9 @@ describe('"modules" option', () => { expect(getModuleSource('./modules/order/index.css', stats)).toMatchSnapshot( 'module' ); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); diff --git a/test/onlyLocals-option.test.js b/test/onlyLocals-option.test.js index 27896192..fd0f0b0d 100644 --- a/test/onlyLocals-option.test.js +++ b/test/onlyLocals-option.test.js @@ -1,11 +1,10 @@ import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('"onlyLocals" option', () => { @@ -19,9 +18,9 @@ describe('"onlyLocals" option', () => { expect( getModuleSource('./modules/composes/composes.css', stats) ).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); diff --git a/test/sourceMap-option.test.js b/test/sourceMap-option.test.js index 9be0a262..e5468cc8 100644 --- a/test/sourceMap-option.test.js +++ b/test/sourceMap-option.test.js @@ -4,12 +4,11 @@ import postcssPresetEnv from 'postcss-preset-env'; import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('"sourceMap" option', () => { @@ -22,7 +21,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -40,7 +39,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -81,7 +80,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -123,7 +122,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -172,7 +171,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -213,7 +212,7 @@ describe('"sourceMap" option', () => { getModuleSource('./source-map/basic.postcss.css', stats) ).toMatchSnapshot('module'); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -253,7 +252,9 @@ describe('"sourceMap" option', () => { // const stats = await compile(compiler); // // expect(getModuleSource('./source-map/basic.scss', stats)).toMatchSnapshot('module'); - // expect(execute(readAsset('main.bundle.js', compiler, stats))).toMatchSnapshot('result'); + // expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + // 'result' + // ); // expect(getWarnings(stats)).toMatchSnapshot('warnings'); // expect(getErrors(stats)).toMatchSnapshot('errors'); // }); @@ -270,7 +271,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -311,7 +312,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -353,7 +354,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -402,7 +403,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -442,7 +443,7 @@ describe('"sourceMap" option', () => { getModuleSource('./source-map/basic.postcss.css', stats) ).toMatchSnapshot('module'); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); @@ -484,7 +485,7 @@ describe('"sourceMap" option', () => { 'module' ); expect( - execute(readAsset('main.bundle.js', compiler, stats)) + getExecutedCode('main.bundle.js', compiler, stats) ).toMatchSnapshot('result'); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); diff --git a/test/url-option.test.js b/test/url-option.test.js index 59e34c1d..258ce6b7 100644 --- a/test/url-option.test.js +++ b/test/url-option.test.js @@ -1,11 +1,10 @@ import { compile, - execute, getCompiler, getErrors, + getExecutedCode, getModuleSource, getWarnings, - readAsset, } from './helpers/index'; describe('"url" option', () => { @@ -14,9 +13,9 @@ describe('"url" option', () => { const stats = await compile(compiler); expect(getModuleSource('./url/url.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -26,9 +25,9 @@ describe('"url" option', () => { const stats = await compile(compiler); expect(getModuleSource('./url/url.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -38,9 +37,9 @@ describe('"url" option', () => { const stats = await compile(compiler); expect(getModuleSource('./url/url.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); }); @@ -61,9 +60,9 @@ describe('"url" option', () => { const stats = await compile(compiler); expect(getModuleSource('./url/url.css', stats)).toMatchSnapshot('module'); - expect( - execute(readAsset('main.bundle.js', compiler, stats)) - ).toMatchSnapshot('result'); + expect(getExecutedCode('main.bundle.js', compiler, stats)).toMatchSnapshot( + 'result' + ); expect(getWarnings(stats)).toMatchSnapshot('warnings'); expect(getErrors(stats)).toMatchSnapshot('errors'); });