From ea928b8ce51c75c2dbefb6f812e4ba44b77aeb5e Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 16:55:31 +0300 Subject: [PATCH 1/8] test: webpack@5 --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) 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' From 40684104694ad435071a5e2129081c76ca2e0219 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 16:56:08 +0300 Subject: [PATCH 2/8] test: webpack@5 --- package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 003bbb85..d6ef193c 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", From cb82a56b4c545bd3894cf2d075e2f71f9ef44ca9 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 17:08:03 +0300 Subject: [PATCH 3/8] test: webpack@5 --- test/__snapshots__/url-option.test.js.snap | 1360 +------------------- 1 file changed, 2 insertions(+), 1358 deletions(-) diff --git a/test/__snapshots__/url-option.test.js.snap b/test/__snapshots__/url-option.test.js.snap index 16a57fab..d38d59bc 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); } @@ -501,1359 +501,3 @@ Warning (228:3) Unable to find uri in 'background-image: image-set(url('') 1x)'", ] `; - -exports[`"url" option should work with a value equal to "Function": errors 1`] = `Array []`; - -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_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\\"); -var ___CSS_LOADER_URL_IMPORT_2___ = require(\\"./font.eot\\"); -var ___CSS_LOADER_URL_IMPORT_3___ = require(\\"package/font.ttf\\"); -var ___CSS_LOADER_URL_IMPORT_4___ = require(\\"./font with spaces.eot\\"); -var ___CSS_LOADER_URL_IMPORT_5___ = require(\\"./font.svg\\"); -var ___CSS_LOADER_URL_IMPORT_6___ = require(\\"./font.woff2?foo=bar\\"); -var ___CSS_LOADER_URL_IMPORT_7___ = require(\\"./img1x.png\\"); -var ___CSS_LOADER_URL_IMPORT_8___ = require(\\"./img2x.png\\"); -var ___CSS_LOADER_URL_IMPORT_9___ = require(\\"./img-simple.png\\"); -var ___CSS_LOADER_URL_IMPORT_10___ = require(\\"../url/img-simple.png\\"); -var ___CSS_LOADER_URL_IMPORT_11___ = require(\\"./img3x.png\\"); -var ___CSS_LOADER_URL_IMPORT_12___ = require(\\"./img1x.png?foo=bar\\"); -var ___CSS_LOADER_URL_IMPORT_13___ = require(\\"./img.png\\"); -exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); -exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); -var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___); -var ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___); -var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___); -var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___); -var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___); -var ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___, { hash: \\"#svgFontName\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_6___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___); -var ___CSS_LOADER_URL_REPLACEMENT_7___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___, { hash: \\"?#iefix\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_8___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___, { hash: \\"?#iefix\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_9___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___); -var ___CSS_LOADER_URL_REPLACEMENT_10___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___); -var ___CSS_LOADER_URL_REPLACEMENT_11___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_9___); -var ___CSS_LOADER_URL_REPLACEMENT_12___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_10___); -var ___CSS_LOADER_URL_REPLACEMENT_13___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_14___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_15___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_16___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_17___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___, { hash: \\"#hash\\", needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_18___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___, { hash: \\"?#iefix\\", needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_19___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___); -var ___CSS_LOADER_URL_REPLACEMENT_20___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_13___); -// Module -exports.push([module.id, \\".class {\\\\n background: url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(./img.png);\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\n \\\\\\"./img.png\\\\\\"\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( ./img.png ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(~package/img.png) url(./other-img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,#filter');\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter');\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url(#highlight);\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") format('woff'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") format('eot'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \\") format('truetype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_5___ + \\") format('svg'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_6___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_7___ + \\") format('embedded-opentype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_8___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n body {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: \\\\\\"do not use url(path)\\\\\\";\\\\n}\\\\n\\\\nb {\\\\n content: 'do not \\\\\\"use\\\\\\" url(path)';\\\\n}\\\\n\\\\n@keyframes anim {\\\\n background: green url('./img.png') xyz;\\\\n}\\\\n\\\\n.a {\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x)\\\\n}\\\\n\\\\n.class {\\\\n background: green url() xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url('') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(' ') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\n ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url('./img.png') url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\") url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: ___CSS_LOADER_URL___;\\\\n background: ___CSS_LOADER_URL___INDEX___;\\\\n background: ___CSS_LOADER_URL___99999___;\\\\n background: ___CSS_LOADER_IMPORT___;\\\\n background: ___CSS_LOADER_IMPORT___INDEX___;\\\\n background: ___CSS_LOADER_IMPORT___99999___;\\\\n}\\\\n\\\\n.pure-url {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_11___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_12___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n background: url('~package/img.png');\\\\n}\\\\n\\\\n.aliases {\\\\n background: url('~aliasesImg/img.png') ;\\\\n}\\\\n\\\\na {\\\\n background: url(./nested/img.png);\\\\n}\\\\n\\\\na {\\\\n background: url(nested/img.png);\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n /* Broken */\\\\n background-image: -webkit-image-set();\\\\n background-image: -webkit-image-set('');\\\\n background-image: image-set();\\\\n background-image: image-set('');\\\\n background-image: image-set(\\\\\\"\\\\\\");\\\\n background-image: image-set(\\\\\\"\\\\\\" 1x);\\\\n background-image: image-set(url());\\\\n background-image: image-set(\\\\n url()\\\\n );\\\\n background-image: image-set(URL());\\\\n background-image: image-set(url(''));\\\\n background-image: image-set(url(\\\\\\"\\\\\\"));\\\\n background-image: image-set(url('') 1x);\\\\n background-image: image-set(1x);\\\\n background-image: image-set(\\\\n 1x\\\\n );\\\\n background: image-set(calc(1rem + 1px) 1x);\\\\n\\\\n /* Strings */\\\\n background-image: -webkit-image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n background-image: image-set(\\\\\\"./img img.png\\\\\\" 1x, \\\\\\"./img img.png\\\\\\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x),\\\\n image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n background-image: image-set(\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\" 600dpi\\\\n );\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_16___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_17___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \\" 1x);\\\\n\\\\n /* With \`url\` function */\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x);\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x);\\\\n background-image: -webkit-image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_19___ + \\") 600dpi\\\\n );\\\\n background-image: image-set(url(\\\\\\"./img img.png\\\\\\") 1x, url(\\\\\\"./img img.png\\\\\\") 2x);\\\\n\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n}\\\\n\\\\n.class {\\\\n /* Not allowed on windows */\\\\n /* background: url(./img\\\\\\\\\\\\\\"img.png); */\\\\n background: url(./img\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\(img.png);\\\\n background: url(./img\\\\\\\\)img.png);\\\\n background: url(./img\\\\\\\\ img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png);\\\\n\\\\n background-image: image-set(\\\\n /* Not allowed on windows */\\\\n /* url(./img\\\\\\\\\\\\\\"img.png) 1x, */\\\\n url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png) 2x,\\\\n url(./img\\\\\\\\'img.png) 3x,\\\\n url(./img\\\\\\\\(img.png) 4x,\\\\n url(./img\\\\\\\\)img.png) 5x,\\\\n url(./img\\\\\\\\ img.png) 6x,\\\\n url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png) 7x\\\\n );\\\\n}\\\\n\\\\n.class-class-class {\\\\n background: url(\\\\\\"./img'''img.png\\\\\\");\\\\n background: url(\\\\\\"./img'() img.png\\\\\\");\\\\n background: url(\\\\\\"./img'img.png\\\\\\");\\\\n background: url(\\\\\\"./img(img.png\\\\\\");\\\\n background: url(\\\\\\"./img)img.png\\\\\\");\\\\n background: url('./img img.png');\\\\n background: url(\\\\\\"./img img.png\\\\\\");\\\\n}\\\\n\\\\n.class.class.class {\\\\n background: url('./img\\\\\\\\\\\\n(img.png');\\\\n background: url('./img\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n(img.png');\\\\n}\\\\n\\\\n.other-test-case {\\\\n background: url(\\\\\\"./img%27%27%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27%28%29%20img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%28img.png\\\\\\");\\\\n background: url(\\\\\\"./img%29img.png\\\\\\");\\\\n background: url(\\\\\\"./img%20img.png\\\\\\");\\\\n background: url(./img%27%27%27img.png);\\\\n background: url(./img%27%28%29%20img.png);\\\\n background: url(./img%27img.png);\\\\n background: url(./img%28img.png);\\\\n background: url(./img%29img.png);\\\\n background: url(./img%20img.png);\\\\n}\\\\n\\\\n.qqq {\\\\n background: url('img.png');\\\\n}\\\\n\\\\n.www {\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\(img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\)img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \\");\\\\n background: url(\\\\\\"./img\\\\\\\\27img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\28%29 img.png\\\\\\");\\\\n background: url(./img\\\\\\\\'\\\\\\\\28%29\\\\\\\\ img.png);\\\\n}\\\\n\\", \\"\\"]); -" -`; - -exports[`"url" option should work with a value equal to "Function": result 1`] = ` -Array [ - Array [ - "../../src/index.js?!./url/imported.css", - ".bar { - background: url(/webpack/public/path/img-from-imported.png); -} -", - "", - ], - Array [ - "./url/url.css", - ".class { - background: url('./img.png'); -} - -.class { - background: url(\\"./img.png\\"); -} - -.class { - background: url(./img.png); -} - -.class { - background: url(\\"./img.png#hash\\"); -} - -.class { - background: url( - \\"./img.png\\" - ); -} - -.class { - background: green url( './img.png' ) xyz; -} - -.class { - background: green url( \\"./img.png\\" ) xyz; -} - -.class { - background: green url( ./img.png ) xyz; -} - -.class { - background: green url(~package/img.png) url(./other-img.png) xyz; -} - -.class { - background: green url( \\"./img img.png\\" ) xyz; -} - -.class { - background: green url( './img img.png' ) xyz; -} - -.class { - background: green url(/img.png) xyz; -} - -.class { - background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz; -} - -.class { - background-image: url(\\"data:image/svg+xml;charset=utf-8,\\"); -} - -.class { - background-image: url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\"); -} - -.class { - filter: url('data:image/svg+xml;charset=utf-8,#filter'); -} - -.class { - filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter'); -} - -.highlight { - filter: url(#highlight); -} - -.highlight { - filter: url('#line-marker'); -} - -@font-face { - src: url(/webpack/public/path/font.woff) format('woff'), - url(/webpack/public/path/font.woff2) format('woff2'), - url(/webpack/public/path/font.eot) format('eot'), - url(/webpack/public/path/font.ttf) format('truetype'), - url(\\"/webpack/public/path/font with spaces.eot\\") format(\\"embedded-opentype\\"), - url(/webpack/public/path/font.svg#svgFontName) format('svg'), - url(/webpack/public/path/font.woff2) format('woff2'), - url(/webpack/public/path/font.eot?#iefix) format('embedded-opentype'), - url(\\"/webpack/public/path/font with spaces.eot?#iefix\\") format('embedded-opentype'); -} - -@media (min-width: 500px) { - body { - background: url(\\"./img.png\\"); - } -} - -a { - content: \\"do not use url(path)\\"; -} - -b { - content: 'do not \\"use\\" url(path)'; -} - -@keyframes anim { - background: green url('./img.png') xyz; -} - -.a { - background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) -} - -.a { - background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) -} - -.class { - background: green url() xyz; -} - -.class { - background: green url('') xyz; -} - -.class { - background: green url(\\"\\") xyz; -} - -.class { - background: green url(' ') xyz; -} - -.class { - background: green url( - ) xyz; -} - -.class { - background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; -} - -.class { - background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; -} - -.class { - background: url(\\"./img.png?foo\\"); -} - -.class { - background: url(\\"./img.png?foo=bar\\"); -} - -.class { - background: url(\\"./img.png?foo=bar#hash\\"); -} - -.class { - background: url(\\"./img.png?foo=bar#hash\\"); -} - -.class { - background: url(\\"./img.png?\\"); -} - -.class { - background-image: url('./img.png') url(\\"data:image/svg+xml;charset=utf-8,\\") url('./img.png'); -} - -.class { - background: ___CSS_LOADER_URL___; - background: ___CSS_LOADER_URL___INDEX___; - background: ___CSS_LOADER_URL___99999___; - background: ___CSS_LOADER_IMPORT___; - background: ___CSS_LOADER_IMPORT___INDEX___; - background: ___CSS_LOADER_IMPORT___99999___; -} - -.pure-url { - background: url(/webpack/public/path/img-simple.png); -} - -.not-resolved { - background: url('/img-simple.png'); -} - -.above-below { - background: url(/webpack/public/path/img-simple.png); -} - -.tilde { - background: url('~package/img.png'); -} - -.aliases { - background: url('~aliasesImg/img.png') ; -} - -a { - background: url(./nested/img.png); -} - -a { - background: url(nested/img.png); -} - -@font-face { - src: url(\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\"); -} - -.class { - /* Broken */ - background-image: -webkit-image-set(); - background-image: -webkit-image-set(''); - background-image: image-set(); - background-image: image-set(''); - background-image: image-set(\\"\\"); - background-image: image-set(\\"\\" 1x); - background-image: image-set(url()); - background-image: image-set( - url() - ); - background-image: image-set(URL()); - background-image: image-set(url('')); - background-image: image-set(url(\\"\\")); - background-image: image-set(url('') 1x); - background-image: image-set(1x); - background-image: image-set( - 1x - ); - background: image-set(calc(1rem + 1px) 1x); - - /* Strings */ - background-image: -webkit-image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); - background-image: image-set(\\"./img img.png\\" 1x, \\"./img img.png\\" 2x); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x), - image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); - background-image: image-set( - \\"/webpack/public/path/img1x.png\\" 1x, - \\"/webpack/public/path/img2x.png\\" 2x, - \\"/webpack/public/path/img3x.png\\" 600dpi - ); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); - background-image: image-set(\\"/webpack/public/path/img1x.png#hash\\" 1x); - background-image: image-set(\\"/webpack/public/path/img1x.png?#iefix\\" 1x); - - /* With \`url\` function */ - background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); - background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x); - background-image: -webkit-image-set( - url(/webpack/public/path/img1x.png) 1x - ); - background-image: image-set(url(/webpack/public/path/img1x.png) 1x); - background-image: image-set( - url(/webpack/public/path/img1x.png) 1x - ); - background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); - background-image: image-set( - url(/webpack/public/path/img1x.png) 1x, - url(/webpack/public/path/img2x.png) 2x, - url(/webpack/public/path/img3x.png) 600dpi - ); - background-image: image-set(url(\\"./img img.png\\") 1x, url(\\"./img img.png\\") 2x); - - background-image: image-set(url(/webpack/public/path/img1x.png) 1x, \\"/webpack/public/path/img2x.png\\" 2x); -} - -.class { - /* Not allowed on windows */ - /* background: url(./img\\\\\\"img.png); */ - background: url(./img\\\\'img.png); - background: url(./img\\\\'\\\\'\\\\'img.png); - background: url(./img\\\\(img.png); - background: url(./img\\\\)img.png); - background: url(./img\\\\ img.png); - background: url(./img\\\\'\\\\(\\\\)\\\\ img.png); - - background-image: image-set( - /* Not allowed on windows */ - /* url(./img\\\\\\"img.png) 1x, */ - url(./img\\\\'\\\\'\\\\'img.png) 2x, - url(./img\\\\'img.png) 3x, - url(./img\\\\(img.png) 4x, - url(./img\\\\)img.png) 5x, - url(./img\\\\ img.png) 6x, - url(./img\\\\'\\\\(\\\\)\\\\ img.png) 7x - ); -} - -.class-class-class { - background: url(\\"./img'''img.png\\"); - background: url(\\"./img'() img.png\\"); - background: url(\\"./img'img.png\\"); - background: url(\\"./img(img.png\\"); - background: url(\\"./img)img.png\\"); - background: url('./img img.png'); - background: url(\\"./img img.png\\"); -} - -.class.class.class { - background: url('./img\\\\ -(img.png'); - background: url('./img\\\\ -\\\\ -\\\\ -\\\\ -(img.png'); -} - -.other-test-case { - background: url(\\"./img%27%27%27img.png\\"); - background: url(\\"./img%27%28%29%20img.png\\"); - background: url(\\"./img%27img.png\\"); - background: url(\\"./img%28img.png\\"); - background: url(\\"./img%29img.png\\"); - background: url(\\"./img%20img.png\\"); - background: url(./img%27%27%27img.png); - background: url(./img%27%28%29%20img.png); - background: url(./img%27img.png); - background: url(./img%28img.png); - background: url(./img%29img.png); - background: url(./img%20img.png); -} - -.qqq { - background: url('img.png'); -} - -.www { - background: url(\\"./img\\\\'\\\\'\\\\'img.png\\"); - background: url(\\"./img\\\\'\\\\(\\\\)\\\\ img.png\\"); - background: url(\\"./img\\\\'img.png\\"); - background: url(\\"./img\\\\(img.png\\"); - background: url(\\"./img\\\\)img.png\\"); - background: url(\\"./img\\\\ img.png\\"); - background: url(/webpack/public/path/img.png); - background: url(/webpack/public/path/img.png); - background: url(\\"./img\\\\27img.png\\"); - background: url(\\"./img\\\\'\\\\28%29 img.png\\"); - background: url(./img\\\\'\\\\28%29\\\\ img.png); -} -", - "", - ], -] -`; - -exports[`"url" option should work with a value equal to "Function": warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(120:3) Unable to find uri in 'background: green url() xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(124:3) Unable to find uri in 'background: green url('') xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(128:3) Unable to find uri in 'background: green url(\\"\\") xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(132:3) Unable to find uri in 'background: green url(' ') xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(136:3) Unable to find uri in 'background: green url( - ) xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(216:3) Unable to find uri in 'background-image: -webkit-image-set('')'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(218:3) Unable to find uri in 'background-image: image-set('')'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(219:3) Unable to find uri in 'background-image: image-set(\\"\\")'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(220:3) Unable to find uri in 'background-image: image-set(\\"\\" 1x)'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(221:3) Unable to find uri in 'background-image: image-set(url())'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(222:3) Unable to find uri in 'background-image: image-set( - url() - )'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(225:3) Unable to find uri in 'background-image: image-set(URL())'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(226:3) Unable to find uri in 'background-image: image-set(url(''))'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(227:3) Unable to find uri in 'background-image: image-set(url(\\"\\"))'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(228:3) Unable to find uri in 'background-image: image-set(url('') 1x)'", -] -`; - -exports[`"url" option should work with a value equal to "false": errors 1`] = `Array []`; - -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\\"); -exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); -exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); -// Module -exports.push([module.id, \\".class {\\\\n background: url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(./img.png);\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\n \\\\\\"./img.png\\\\\\"\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( ./img.png ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(~package/img.png) url(./other-img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,#filter');\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter');\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url(#highlight);\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(./font.woff) format('woff'),\\\\n url('./font.woff2') format('woff2'),\\\\n url(\\\\\\"./font.eot\\\\\\") format('eot'),\\\\n url(~package/font.ttf) format('truetype'),\\\\n url(\\\\\\"./font with spaces.eot\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url('./font.svg#svgFontName') format('svg'),\\\\n url('./font.woff2?foo=bar') format('woff2'),\\\\n url(\\\\\\"./font.eot?#iefix\\\\\\") format('embedded-opentype'),\\\\n url(\\\\\\"./font with spaces.eot?#iefix\\\\\\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n body {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: \\\\\\"do not use url(path)\\\\\\";\\\\n}\\\\n\\\\nb {\\\\n content: 'do not \\\\\\"use\\\\\\" url(path)';\\\\n}\\\\n\\\\n@keyframes anim {\\\\n background: green url('./img.png') xyz;\\\\n}\\\\n\\\\n.a {\\\\n background-image: -webkit-image-set(url('./img1x.png') 1x, url('./img2x.png') 2x)\\\\n}\\\\n\\\\n.a {\\\\n background-image: image-set(url('./img1x.png') 1x, url('./img2x.png') 2x)\\\\n}\\\\n\\\\n.class {\\\\n background: green url() xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url('') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(' ') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\n ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url('./img.png') url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\") url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: ___CSS_LOADER_URL___;\\\\n background: ___CSS_LOADER_URL___INDEX___;\\\\n background: ___CSS_LOADER_URL___99999___;\\\\n background: ___CSS_LOADER_IMPORT___;\\\\n background: ___CSS_LOADER_IMPORT___INDEX___;\\\\n background: ___CSS_LOADER_IMPORT___99999___;\\\\n}\\\\n\\\\n.pure-url {\\\\n background: url('img-simple.png');\\\\n}\\\\n\\\\n.not-resolved {\\\\n background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n background: url('../url/img-simple.png');\\\\n}\\\\n\\\\n.tilde {\\\\n background: url('~package/img.png');\\\\n}\\\\n\\\\n.aliases {\\\\n background: url('~aliasesImg/img.png') ;\\\\n}\\\\n\\\\na {\\\\n background: url(./nested/img.png);\\\\n}\\\\n\\\\na {\\\\n background: url(nested/img.png);\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n /* Broken */\\\\n background-image: -webkit-image-set();\\\\n background-image: -webkit-image-set('');\\\\n background-image: image-set();\\\\n background-image: image-set('');\\\\n background-image: image-set(\\\\\\"\\\\\\");\\\\n background-image: image-set(\\\\\\"\\\\\\" 1x);\\\\n background-image: image-set(url());\\\\n background-image: image-set(\\\\n url()\\\\n );\\\\n background-image: image-set(URL());\\\\n background-image: image-set(url(''));\\\\n background-image: image-set(url(\\\\\\"\\\\\\"));\\\\n background-image: image-set(url('') 1x);\\\\n background-image: image-set(1x);\\\\n background-image: image-set(\\\\n 1x\\\\n );\\\\n background: image-set(calc(1rem + 1px) 1x);\\\\n\\\\n /* Strings */\\\\n background-image: -webkit-image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\\\"./img1x.png\\\\\\" 1x);\\\\n background-image: image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\\\"./img img.png\\\\\\" 1x, \\\\\\"./img img.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x),\\\\n image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\n \\\\\\"./img1x.png\\\\\\" 1x,\\\\n \\\\\\"./img2x.png\\\\\\" 2x,\\\\n \\\\\\"./img3x.png\\\\\\" 600dpi\\\\n );\\\\n background-image: image-set(\\\\\\"./img1x.png?foo=bar\\\\\\" 1x);\\\\n background-image: image-set(\\\\\\"./img1x.png#hash\\\\\\" 1x);\\\\n background-image: image-set(\\\\\\"./img1x.png?#iefix\\\\\\" 1x);\\\\n\\\\n /* With \`url\` function */\\\\n background-image: -webkit-image-set(url(\\\\\\"./img1x.png\\\\\\") 1x, url(\\\\\\"./img2x.png\\\\\\") 2x);\\\\n background-image: -webkit-image-set(url(\\\\\\"./img1x.png\\\\\\") 1x);\\\\n background-image: -webkit-image-set(\\\\n url(\\\\\\"./img1x.png\\\\\\") 1x\\\\n );\\\\n background-image: image-set(url(./img1x.png) 1x);\\\\n background-image: image-set(\\\\n url(./img1x.png) 1x\\\\n );\\\\n background-image: image-set(url(\\\\\\"./img1x.png\\\\\\") 1x, url(\\\\\\"./img2x.png\\\\\\") 2x);\\\\n background-image: image-set(\\\\n url(./img1x.png) 1x,\\\\n url(./img2x.png) 2x,\\\\n url(./img3x.png) 600dpi\\\\n );\\\\n background-image: image-set(url(\\\\\\"./img img.png\\\\\\") 1x, url(\\\\\\"./img img.png\\\\\\") 2x);\\\\n\\\\n background-image: image-set(url(\\\\\\"./img1x.png\\\\\\") 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n}\\\\n\\\\n.class {\\\\n /* Not allowed on windows */\\\\n /* background: url(./img\\\\\\\\\\\\\\"img.png); */\\\\n background: url(./img\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\(img.png);\\\\n background: url(./img\\\\\\\\)img.png);\\\\n background: url(./img\\\\\\\\ img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png);\\\\n\\\\n background-image: image-set(\\\\n /* Not allowed on windows */\\\\n /* url(./img\\\\\\\\\\\\\\"img.png) 1x, */\\\\n url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png) 2x,\\\\n url(./img\\\\\\\\'img.png) 3x,\\\\n url(./img\\\\\\\\(img.png) 4x,\\\\n url(./img\\\\\\\\)img.png) 5x,\\\\n url(./img\\\\\\\\ img.png) 6x,\\\\n url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png) 7x\\\\n );\\\\n}\\\\n\\\\n.class-class-class {\\\\n background: url(\\\\\\"./img'''img.png\\\\\\");\\\\n background: url(\\\\\\"./img'() img.png\\\\\\");\\\\n background: url(\\\\\\"./img'img.png\\\\\\");\\\\n background: url(\\\\\\"./img(img.png\\\\\\");\\\\n background: url(\\\\\\"./img)img.png\\\\\\");\\\\n background: url('./img img.png');\\\\n background: url(\\\\\\"./img img.png\\\\\\");\\\\n}\\\\n\\\\n.class.class.class {\\\\n background: url('./img\\\\\\\\\\\\n(img.png');\\\\n background: url('./img\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n(img.png');\\\\n}\\\\n\\\\n.other-test-case {\\\\n background: url(\\\\\\"./img%27%27%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27%28%29%20img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%28img.png\\\\\\");\\\\n background: url(\\\\\\"./img%29img.png\\\\\\");\\\\n background: url(\\\\\\"./img%20img.png\\\\\\");\\\\n background: url(./img%27%27%27img.png);\\\\n background: url(./img%27%28%29%20img.png);\\\\n background: url(./img%27img.png);\\\\n background: url(./img%28img.png);\\\\n background: url(./img%29img.png);\\\\n background: url(./img%20img.png);\\\\n}\\\\n\\\\n.qqq {\\\\n background: url('img.png');\\\\n}\\\\n\\\\n.www {\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\(img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\)img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\\\\\"./\\\\\\\\69\\\\\\\\6D\\\\\\\\67.png\\\\\\");\\\\n background: url(./\\\\\\\\69\\\\\\\\6D\\\\\\\\67.png);\\\\n background: url(\\\\\\"./img\\\\\\\\27img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\28%29 img.png\\\\\\");\\\\n background: url(./img\\\\\\\\'\\\\\\\\28%29\\\\\\\\ img.png);\\\\n}\\\\n\\", \\"\\"]); -" -`; - -exports[`"url" option should work with a value equal to "false": result 1`] = ` -Array [ - Array [ - "../../src/index.js?!./url/imported.css", - ".bar { - background: url('./img-from-imported.png'); -} -", - "", - ], - Array [ - "./url/url.css", - ".class { - background: url('./img.png'); -} - -.class { - background: url(\\"./img.png\\"); -} - -.class { - background: url(./img.png); -} - -.class { - background: url(\\"./img.png#hash\\"); -} - -.class { - background: url( - \\"./img.png\\" - ); -} - -.class { - background: green url( './img.png' ) xyz; -} - -.class { - background: green url( \\"./img.png\\" ) xyz; -} - -.class { - background: green url( ./img.png ) xyz; -} - -.class { - background: green url(~package/img.png) url(./other-img.png) xyz; -} - -.class { - background: green url( \\"./img img.png\\" ) xyz; -} - -.class { - background: green url( './img img.png' ) xyz; -} - -.class { - background: green url(/img.png) xyz; -} - -.class { - background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz; -} - -.class { - background-image: url(\\"data:image/svg+xml;charset=utf-8,\\"); -} - -.class { - background-image: url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\"); -} - -.class { - filter: url('data:image/svg+xml;charset=utf-8,#filter'); -} - -.class { - filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter'); -} - -.highlight { - filter: url(#highlight); -} - -.highlight { - filter: url('#line-marker'); -} - -@font-face { - src: url(./font.woff) format('woff'), - url('./font.woff2') format('woff2'), - url(\\"./font.eot\\") format('eot'), - url(~package/font.ttf) format('truetype'), - url(\\"./font with spaces.eot\\") format(\\"embedded-opentype\\"), - url('./font.svg#svgFontName') format('svg'), - url('./font.woff2?foo=bar') format('woff2'), - url(\\"./font.eot?#iefix\\") format('embedded-opentype'), - url(\\"./font with spaces.eot?#iefix\\") format('embedded-opentype'); -} - -@media (min-width: 500px) { - body { - background: url(\\"./img.png\\"); - } -} - -a { - content: \\"do not use url(path)\\"; -} - -b { - content: 'do not \\"use\\" url(path)'; -} - -@keyframes anim { - background: green url('./img.png') xyz; -} - -.a { - background-image: -webkit-image-set(url('./img1x.png') 1x, url('./img2x.png') 2x) -} - -.a { - background-image: image-set(url('./img1x.png') 1x, url('./img2x.png') 2x) -} - -.class { - background: green url() xyz; -} - -.class { - background: green url('') xyz; -} - -.class { - background: green url(\\"\\") xyz; -} - -.class { - background: green url(' ') xyz; -} - -.class { - background: green url( - ) xyz; -} - -.class { - background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; -} - -.class { - background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; -} - -.class { - background: url(\\"./img.png?foo\\"); -} - -.class { - background: url(\\"./img.png?foo=bar\\"); -} - -.class { - background: url(\\"./img.png?foo=bar#hash\\"); -} - -.class { - background: url(\\"./img.png?foo=bar#hash\\"); -} - -.class { - background: url(\\"./img.png?\\"); -} - -.class { - background-image: url('./img.png') url(\\"data:image/svg+xml;charset=utf-8,\\") url('./img.png'); -} - -.class { - background: ___CSS_LOADER_URL___; - background: ___CSS_LOADER_URL___INDEX___; - background: ___CSS_LOADER_URL___99999___; - background: ___CSS_LOADER_IMPORT___; - background: ___CSS_LOADER_IMPORT___INDEX___; - background: ___CSS_LOADER_IMPORT___99999___; -} - -.pure-url { - background: url('img-simple.png'); -} - -.not-resolved { - background: url('/img-simple.png'); -} - -.above-below { - background: url('../url/img-simple.png'); -} - -.tilde { - background: url('~package/img.png'); -} - -.aliases { - background: url('~aliasesImg/img.png') ; -} - -a { - background: url(./nested/img.png); -} - -a { - background: url(nested/img.png); -} - -@font-face { - src: url(\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\"); -} - -.class { - /* Broken */ - background-image: -webkit-image-set(); - background-image: -webkit-image-set(''); - background-image: image-set(); - background-image: image-set(''); - background-image: image-set(\\"\\"); - background-image: image-set(\\"\\" 1x); - background-image: image-set(url()); - background-image: image-set( - url() - ); - background-image: image-set(URL()); - background-image: image-set(url('')); - background-image: image-set(url(\\"\\")); - background-image: image-set(url('') 1x); - background-image: image-set(1x); - background-image: image-set( - 1x - ); - background: image-set(calc(1rem + 1px) 1x); - - /* Strings */ - background-image: -webkit-image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x); - background-image: image-set(\\"./img1x.png\\" 1x); - background-image: image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x); - background-image: image-set(\\"./img img.png\\" 1x, \\"./img img.png\\" 2x); - background-image: image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x), - image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x); - background-image: image-set( - \\"./img1x.png\\" 1x, - \\"./img2x.png\\" 2x, - \\"./img3x.png\\" 600dpi - ); - background-image: image-set(\\"./img1x.png?foo=bar\\" 1x); - background-image: image-set(\\"./img1x.png#hash\\" 1x); - background-image: image-set(\\"./img1x.png?#iefix\\" 1x); - - /* With \`url\` function */ - background-image: -webkit-image-set(url(\\"./img1x.png\\") 1x, url(\\"./img2x.png\\") 2x); - background-image: -webkit-image-set(url(\\"./img1x.png\\") 1x); - background-image: -webkit-image-set( - url(\\"./img1x.png\\") 1x - ); - background-image: image-set(url(./img1x.png) 1x); - background-image: image-set( - url(./img1x.png) 1x - ); - background-image: image-set(url(\\"./img1x.png\\") 1x, url(\\"./img2x.png\\") 2x); - background-image: image-set( - url(./img1x.png) 1x, - url(./img2x.png) 2x, - url(./img3x.png) 600dpi - ); - background-image: image-set(url(\\"./img img.png\\") 1x, url(\\"./img img.png\\") 2x); - - background-image: image-set(url(\\"./img1x.png\\") 1x, \\"./img2x.png\\" 2x); -} - -.class { - /* Not allowed on windows */ - /* background: url(./img\\\\\\"img.png); */ - background: url(./img\\\\'img.png); - background: url(./img\\\\'\\\\'\\\\'img.png); - background: url(./img\\\\(img.png); - background: url(./img\\\\)img.png); - background: url(./img\\\\ img.png); - background: url(./img\\\\'\\\\(\\\\)\\\\ img.png); - - background-image: image-set( - /* Not allowed on windows */ - /* url(./img\\\\\\"img.png) 1x, */ - url(./img\\\\'\\\\'\\\\'img.png) 2x, - url(./img\\\\'img.png) 3x, - url(./img\\\\(img.png) 4x, - url(./img\\\\)img.png) 5x, - url(./img\\\\ img.png) 6x, - url(./img\\\\'\\\\(\\\\)\\\\ img.png) 7x - ); -} - -.class-class-class { - background: url(\\"./img'''img.png\\"); - background: url(\\"./img'() img.png\\"); - background: url(\\"./img'img.png\\"); - background: url(\\"./img(img.png\\"); - background: url(\\"./img)img.png\\"); - background: url('./img img.png'); - background: url(\\"./img img.png\\"); -} - -.class.class.class { - background: url('./img\\\\ -(img.png'); - background: url('./img\\\\ -\\\\ -\\\\ -\\\\ -(img.png'); -} - -.other-test-case { - background: url(\\"./img%27%27%27img.png\\"); - background: url(\\"./img%27%28%29%20img.png\\"); - background: url(\\"./img%27img.png\\"); - background: url(\\"./img%28img.png\\"); - background: url(\\"./img%29img.png\\"); - background: url(\\"./img%20img.png\\"); - background: url(./img%27%27%27img.png); - background: url(./img%27%28%29%20img.png); - background: url(./img%27img.png); - background: url(./img%28img.png); - background: url(./img%29img.png); - background: url(./img%20img.png); -} - -.qqq { - background: url('img.png'); -} - -.www { - background: url(\\"./img\\\\'\\\\'\\\\'img.png\\"); - background: url(\\"./img\\\\'\\\\(\\\\)\\\\ img.png\\"); - background: url(\\"./img\\\\'img.png\\"); - background: url(\\"./img\\\\(img.png\\"); - background: url(\\"./img\\\\)img.png\\"); - background: url(\\"./img\\\\ img.png\\"); - background: url(\\"./\\\\69\\\\6D\\\\67.png\\"); - background: url(./\\\\69\\\\6D\\\\67.png); - background: url(\\"./img\\\\27img.png\\"); - background: url(\\"./img\\\\'\\\\28%29 img.png\\"); - background: url(./img\\\\'\\\\28%29\\\\ img.png); -} -", - "", - ], -] -`; - -exports[`"url" option should work with a value equal to "false": warnings 1`] = `Array []`; - -exports[`"url" option should work with a value equal to "true": errors 1`] = `Array []`; - -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_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\\"); -var ___CSS_LOADER_URL_IMPORT_2___ = require(\\"./other-img.png\\"); -var ___CSS_LOADER_URL_IMPORT_3___ = require(\\"./img img.png\\"); -var ___CSS_LOADER_URL_IMPORT_4___ = require(\\"./font.woff\\"); -var ___CSS_LOADER_URL_IMPORT_5___ = require(\\"./font.woff2\\"); -var ___CSS_LOADER_URL_IMPORT_6___ = require(\\"./font.eot\\"); -var ___CSS_LOADER_URL_IMPORT_7___ = require(\\"package/font.ttf\\"); -var ___CSS_LOADER_URL_IMPORT_8___ = require(\\"./font with spaces.eot\\"); -var ___CSS_LOADER_URL_IMPORT_9___ = require(\\"./font.svg\\"); -var ___CSS_LOADER_URL_IMPORT_10___ = require(\\"./font.woff2?foo=bar\\"); -var ___CSS_LOADER_URL_IMPORT_11___ = require(\\"./img1x.png\\"); -var ___CSS_LOADER_URL_IMPORT_12___ = require(\\"./img2x.png\\"); -var ___CSS_LOADER_URL_IMPORT_13___ = require(\\"./img.png?foo\\"); -var ___CSS_LOADER_URL_IMPORT_14___ = require(\\"./img.png?foo=bar\\"); -var ___CSS_LOADER_URL_IMPORT_15___ = require(\\"./img.png?\\"); -var ___CSS_LOADER_URL_IMPORT_16___ = require(\\"./img-simple.png\\"); -var ___CSS_LOADER_URL_IMPORT_17___ = require(\\"../url/img-simple.png\\"); -var ___CSS_LOADER_URL_IMPORT_18___ = require(\\"aliasesImg/img.png\\"); -var ___CSS_LOADER_URL_IMPORT_19___ = require(\\"./nested/img.png\\"); -var ___CSS_LOADER_URL_IMPORT_20___ = require(\\"./img3x.png\\"); -var ___CSS_LOADER_URL_IMPORT_21___ = require(\\"./img1x.png?foo=bar\\"); -var ___CSS_LOADER_URL_IMPORT_22___ = require(\\"./img'img.png\\"); -var ___CSS_LOADER_URL_IMPORT_23___ = require(\\"./img'''img.png\\"); -var ___CSS_LOADER_URL_IMPORT_24___ = require(\\"./img(img.png\\"); -var ___CSS_LOADER_URL_IMPORT_25___ = require(\\"./img)img.png\\"); -var ___CSS_LOADER_URL_IMPORT_26___ = require(\\"./img'() img.png\\"); -exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); -exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); -var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___); -var ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___, { hash: \\"#hash\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___); -var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___); -var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___); -var ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___); -var ___CSS_LOADER_URL_REPLACEMENT_6___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___); -var ___CSS_LOADER_URL_REPLACEMENT_7___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___); -var ___CSS_LOADER_URL_REPLACEMENT_8___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___); -var ___CSS_LOADER_URL_REPLACEMENT_9___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___); -var ___CSS_LOADER_URL_REPLACEMENT_10___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_9___, { hash: \\"#svgFontName\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_11___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_10___); -var ___CSS_LOADER_URL_REPLACEMENT_12___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___, { hash: \\"?#iefix\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_13___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___, { hash: \\"?#iefix\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_14___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___); -var ___CSS_LOADER_URL_REPLACEMENT_15___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___); -var ___CSS_LOADER_URL_REPLACEMENT_16___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_13___); -var ___CSS_LOADER_URL_REPLACEMENT_17___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_14___); -var ___CSS_LOADER_URL_REPLACEMENT_18___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_14___, { hash: \\"#hash\\" }); -var ___CSS_LOADER_URL_REPLACEMENT_19___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_15___); -var ___CSS_LOADER_URL_REPLACEMENT_20___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_16___); -var ___CSS_LOADER_URL_REPLACEMENT_21___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_17___); -var ___CSS_LOADER_URL_REPLACEMENT_22___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_18___); -var ___CSS_LOADER_URL_REPLACEMENT_23___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_19___); -var ___CSS_LOADER_URL_REPLACEMENT_24___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_25___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_26___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_27___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_20___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_28___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_21___, { needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_29___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { hash: \\"#hash\\", needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_30___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { hash: \\"?#iefix\\", needQuotes: true }); -var ___CSS_LOADER_URL_REPLACEMENT_31___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_20___); -var ___CSS_LOADER_URL_REPLACEMENT_32___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_22___); -var ___CSS_LOADER_URL_REPLACEMENT_33___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_23___); -var ___CSS_LOADER_URL_REPLACEMENT_34___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_24___); -var ___CSS_LOADER_URL_REPLACEMENT_35___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_25___); -var ___CSS_LOADER_URL_REPLACEMENT_36___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_26___); -// Module -exports.push([module.id, \\".class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") url(\\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,#filter');\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter');\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url(#highlight);\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_5___ + \\") format('woff'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_6___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_7___ + \\") format('eot'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_8___ + \\") format('truetype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") format('svg'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_11___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_12___ + \\") format('embedded-opentype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n body {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: \\\\\\"do not use url(path)\\\\\\";\\\\n}\\\\n\\\\nb {\\\\n content: 'do not \\\\\\"use\\\\\\" url(path)';\\\\n}\\\\n\\\\n@keyframes anim {\\\\n background: green url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") xyz;\\\\n}\\\\n\\\\n.a {\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x)\\\\n}\\\\n\\\\n.class {\\\\n background: green url() xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url('') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(' ') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\n ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_16___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_17___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_19___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\") url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: ___CSS_LOADER_URL___;\\\\n background: ___CSS_LOADER_URL___INDEX___;\\\\n background: ___CSS_LOADER_URL___99999___;\\\\n background: ___CSS_LOADER_IMPORT___;\\\\n background: ___CSS_LOADER_IMPORT___INDEX___;\\\\n background: ___CSS_LOADER_IMPORT___99999___;\\\\n}\\\\n\\\\n.pure-url {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_21___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\");\\\\n}\\\\n\\\\n.aliases {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_22___ + \\");\\\\n}\\\\n\\\\na {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_23___ + \\");\\\\n}\\\\n\\\\na {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_23___ + \\");\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n /* Broken */\\\\n background-image: -webkit-image-set();\\\\n background-image: -webkit-image-set('');\\\\n background-image: image-set();\\\\n background-image: image-set('');\\\\n background-image: image-set(\\\\\\"\\\\\\");\\\\n background-image: image-set(\\\\\\"\\\\\\" 1x);\\\\n background-image: image-set(url());\\\\n background-image: image-set(\\\\n url()\\\\n );\\\\n background-image: image-set(URL());\\\\n background-image: image-set(url(''));\\\\n background-image: image-set(url(\\\\\\"\\\\\\"));\\\\n background-image: image-set(url('') 1x);\\\\n background-image: image-set(1x);\\\\n background-image: image-set(\\\\n 1x\\\\n );\\\\n background: image-set(calc(1rem + 1px) 1x);\\\\n\\\\n /* Strings */\\\\n background-image: -webkit-image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_26___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_26___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x),\\\\n image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n background-image: image-set(\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_27___ + \\" 600dpi\\\\n );\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_28___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_29___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_30___ + \\" 1x);\\\\n\\\\n /* With \`url\` function */\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x);\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x);\\\\n background-image: -webkit-image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_31___ + \\") 600dpi\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") 2x);\\\\n\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n}\\\\n\\\\n.class {\\\\n /* Not allowed on windows */\\\\n /* background: url(./img\\\\\\\\\\\\\\"img.png); */\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n\\\\n background-image: image-set(\\\\n \\\\n \\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\") 3x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\") 4x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\") 5x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") 6x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\") 7x\\\\n );\\\\n}\\\\n\\\\n.class-class-class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n}\\\\n\\\\n.class.class.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n}\\\\n\\\\n.other-test-case {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n}\\\\n\\\\n.qqq {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.www {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n}\\\\n\\", \\"\\"]); -" -`; - -exports[`"url" option should work with a value equal to "true": result 1`] = ` -Array [ - Array [ - "../../src/index.js?!./url/imported.css", - ".bar { - background: url(/webpack/public/path/img-from-imported.png); -} -", - "", - ], - Array [ - "./url/url.css", - ".class { - background: url(/webpack/public/path/img.png); -} - -.class { - background: url(/webpack/public/path/img.png); -} - -.class { - background: url(/webpack/public/path/img.png); -} - -.class { - background: url(/webpack/public/path/img.png#hash); -} - -.class { - background: url( - /webpack/public/path/img.png - ); -} - -.class { - background: green url( /webpack/public/path/img.png ) xyz; -} - -.class { - background: green url( /webpack/public/path/img.png ) xyz; -} - -.class { - background: green url( /webpack/public/path/img.png ) xyz; -} - -.class { - background: green url(/webpack/public/path/img.png) url(/webpack/public/path/other-img.png) xyz; -} - -.class { - background: green url( \\"/webpack/public/path/img img.png\\" ) xyz; -} - -.class { - background: green url( \\"/webpack/public/path/img img.png\\" ) xyz; -} - -.class { - background: green url(/img.png) xyz; -} - -.class { - background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz; -} - -.class { - background-image: url(\\"data:image/svg+xml;charset=utf-8,\\"); -} - -.class { - background-image: url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\"); -} - -.class { - filter: url('data:image/svg+xml;charset=utf-8,#filter'); -} - -.class { - filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter'); -} - -.highlight { - filter: url(#highlight); -} - -.highlight { - filter: url('#line-marker'); -} - -@font-face { - src: url(/webpack/public/path/font.woff) format('woff'), - url(/webpack/public/path/font.woff2) format('woff2'), - url(/webpack/public/path/font.eot) format('eot'), - url(/webpack/public/path/font.ttf) format('truetype'), - url(\\"/webpack/public/path/font with spaces.eot\\") format(\\"embedded-opentype\\"), - url(/webpack/public/path/font.svg#svgFontName) format('svg'), - url(/webpack/public/path/font.woff2) format('woff2'), - url(/webpack/public/path/font.eot?#iefix) format('embedded-opentype'), - url(\\"/webpack/public/path/font with spaces.eot?#iefix\\") format('embedded-opentype'); -} - -@media (min-width: 500px) { - body { - background: url(/webpack/public/path/img.png); - } -} - -a { - content: \\"do not use url(path)\\"; -} - -b { - content: 'do not \\"use\\" url(path)'; -} - -@keyframes anim { - background: green url(/webpack/public/path/img.png) xyz; -} - -.a { - background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) -} - -.a { - background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) -} - -.class { - background: green url() xyz; -} - -.class { - background: green url('') xyz; -} - -.class { - background: green url(\\"\\") xyz; -} - -.class { - background: green url(' ') xyz; -} - -.class { - background: green url( - ) xyz; -} - -.class { - background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; -} - -.class { - background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; -} - -.class { - background: url(/webpack/public/path/img.png); -} - -.class { - background: url(/webpack/public/path/img.png); -} - -.class { - background: url(/webpack/public/path/img.png#hash); -} - -.class { - background: url(/webpack/public/path/img.png#hash); -} - -.class { - background: url(/webpack/public/path/img.png); -} - -.class { - background-image: url(/webpack/public/path/img.png) url(\\"data:image/svg+xml;charset=utf-8,\\") url(/webpack/public/path/img.png); -} - -.class { - background: ___CSS_LOADER_URL___; - background: ___CSS_LOADER_URL___INDEX___; - background: ___CSS_LOADER_URL___99999___; - background: ___CSS_LOADER_IMPORT___; - background: ___CSS_LOADER_IMPORT___INDEX___; - background: ___CSS_LOADER_IMPORT___99999___; -} - -.pure-url { - background: url(/webpack/public/path/img-simple.png); -} - -.not-resolved { - background: url('/img-simple.png'); -} - -.above-below { - background: url(/webpack/public/path/img-simple.png); -} - -.tilde { - background: url(/webpack/public/path/img.png); -} - -.aliases { - background: url(/webpack/public/path/img.png); -} - -a { - background: url(/webpack/public/path/img.png); -} - -a { - background: url(/webpack/public/path/img.png); -} - -@font-face { - src: url(\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\"); -} - -.class { - /* Broken */ - background-image: -webkit-image-set(); - background-image: -webkit-image-set(''); - background-image: image-set(); - background-image: image-set(''); - background-image: image-set(\\"\\"); - background-image: image-set(\\"\\" 1x); - background-image: image-set(url()); - background-image: image-set( - url() - ); - background-image: image-set(URL()); - background-image: image-set(url('')); - background-image: image-set(url(\\"\\")); - background-image: image-set(url('') 1x); - background-image: image-set(1x); - background-image: image-set( - 1x - ); - background: image-set(calc(1rem + 1px) 1x); - - /* Strings */ - background-image: -webkit-image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); - background-image: image-set(\\"/webpack/public/path/img img.png\\" 1x, \\"/webpack/public/path/img img.png\\" 2x); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x), - image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); - background-image: image-set( - \\"/webpack/public/path/img1x.png\\" 1x, - \\"/webpack/public/path/img2x.png\\" 2x, - \\"/webpack/public/path/img3x.png\\" 600dpi - ); - background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); - background-image: image-set(\\"/webpack/public/path/img1x.png#hash\\" 1x); - background-image: image-set(\\"/webpack/public/path/img1x.png?#iefix\\" 1x); - - /* With \`url\` function */ - background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); - background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x); - background-image: -webkit-image-set( - url(/webpack/public/path/img1x.png) 1x - ); - background-image: image-set(url(/webpack/public/path/img1x.png) 1x); - background-image: image-set( - url(/webpack/public/path/img1x.png) 1x - ); - background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); - background-image: image-set( - url(/webpack/public/path/img1x.png) 1x, - url(/webpack/public/path/img2x.png) 2x, - url(/webpack/public/path/img3x.png) 600dpi - ); - background-image: image-set(url(\\"/webpack/public/path/img img.png\\") 1x, url(\\"/webpack/public/path/img img.png\\") 2x); - - background-image: image-set(url(/webpack/public/path/img1x.png) 1x, \\"/webpack/public/path/img2x.png\\" 2x); -} - -.class { - /* Not allowed on windows */ - /* background: url(./img\\\\\\"img.png); */ - background: url(\\"/webpack/public/path/img'img.png\\"); - background: url(\\"/webpack/public/path/img'''img.png\\"); - background: url(\\"/webpack/public/path/img(img.png\\"); - background: url(\\"/webpack/public/path/img)img.png\\"); - background: url(\\"/webpack/public/path/img img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); - - background-image: image-set( - - - url(\\"/webpack/public/path/img'''img.png\\") 2x, - url(\\"/webpack/public/path/img'img.png\\") 3x, - url(\\"/webpack/public/path/img(img.png\\") 4x, - url(\\"/webpack/public/path/img)img.png\\") 5x, - url(\\"/webpack/public/path/img img.png\\") 6x, - url(\\"/webpack/public/path/img'() img.png\\") 7x - ); -} - -.class-class-class { - background: url(\\"/webpack/public/path/img'''img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); - background: url(\\"/webpack/public/path/img'img.png\\"); - background: url(\\"/webpack/public/path/img(img.png\\"); - background: url(\\"/webpack/public/path/img)img.png\\"); - background: url(\\"/webpack/public/path/img img.png\\"); - background: url(\\"/webpack/public/path/img img.png\\"); -} - -.class.class.class { - background: url(\\"/webpack/public/path/img(img.png\\"); - background: url(\\"/webpack/public/path/img(img.png\\"); -} - -.other-test-case { - background: url(\\"/webpack/public/path/img'''img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); - background: url(\\"/webpack/public/path/img'img.png\\"); - background: url(\\"/webpack/public/path/img(img.png\\"); - background: url(\\"/webpack/public/path/img)img.png\\"); - background: url(\\"/webpack/public/path/img img.png\\"); - background: url(\\"/webpack/public/path/img'''img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); - background: url(\\"/webpack/public/path/img'img.png\\"); - background: url(\\"/webpack/public/path/img(img.png\\"); - background: url(\\"/webpack/public/path/img)img.png\\"); - background: url(\\"/webpack/public/path/img img.png\\"); -} - -.qqq { - background: url(/webpack/public/path/img.png); -} - -.www { - background: url(\\"/webpack/public/path/img'''img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); - background: url(\\"/webpack/public/path/img'img.png\\"); - background: url(\\"/webpack/public/path/img(img.png\\"); - background: url(\\"/webpack/public/path/img)img.png\\"); - background: url(\\"/webpack/public/path/img img.png\\"); - background: url(/webpack/public/path/img.png); - background: url(/webpack/public/path/img.png); - background: url(\\"/webpack/public/path/img'img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); - background: url(\\"/webpack/public/path/img'() img.png\\"); -} -", - "", - ], -] -`; - -exports[`"url" option should work with a value equal to "true": warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(120:3) Unable to find uri in 'background: green url() xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(124:3) Unable to find uri in 'background: green url('') xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(128:3) Unable to find uri in 'background: green url(\\"\\") xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(132:3) Unable to find uri in 'background: green url(' ') xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(136:3) Unable to find uri in 'background: green url( - ) xyz'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(216:3) Unable to find uri in 'background-image: -webkit-image-set('')'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(218:3) Unable to find uri in 'background-image: image-set('')'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(219:3) Unable to find uri in 'background-image: image-set(\\"\\")'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(220:3) Unable to find uri in 'background-image: image-set(\\"\\" 1x)'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(221:3) Unable to find uri in 'background-image: image-set(url())'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(222:3) Unable to find uri in 'background-image: image-set( - url() - )'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(225:3) Unable to find uri in 'background-image: image-set(URL())'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(226:3) Unable to find uri in 'background-image: image-set(url(''))'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(227:3) Unable to find uri in 'background-image: image-set(url(\\"\\"))'", - "ModuleWarning: Module Warning (from \`replaced original path\`): -Warning - -(228:3) Unable to find uri in 'background-image: image-set(url('') 1x)'", -] -`; From d2d58aa82ac5b1b710c8f88a89a085db4dd05e3a Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 17:18:46 +0300 Subject: [PATCH 4/8] test: webpack@5 --- package-lock.json | 116 ++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 61 insertions(+), 57 deletions(-) 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 d6ef193c..09bf9c73 100644 --- a/package.json +++ b/package.json @@ -88,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", From d94239e6825baf18a51d7d52401c9e6d46ee05e8 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 17:19:14 +0300 Subject: [PATCH 5/8] test: webpack@5 --- test/helpers/getCompiler.js | 8 ++++++-- test/helpers/getExecutedCode.js | 15 +++++++++++++++ test/helpers/getModuleSource.js | 6 +++++- test/helpers/index.js | 2 ++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 test/helpers/getExecutedCode.js 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..eb5b8632 --- /dev/null +++ b/test/helpers/getExecutedCode.js @@ -0,0 +1,15 @@ +import { execute, readAsset } from './index'; + +export default (asset, compiler, stats) => { + let executed = execute(readAsset(asset, compiler, stats)); + + executed = executed.map((module) => { + // Todo remove after drop webpack@4 + // eslint-disable-next-line no-param-reassign + module[0] = module[0].replace(/\?.*!/, '?[ident]!'); + + return module; + }); + + return executed; +}; diff --git a/test/helpers/getModuleSource.js b/test/helpers/getModuleSource.js index fd36a3fc..8340fa41 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(/\?\?.*!/, '??[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, From 815e92447f84f86e407ec2f450194e48f1396359 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 17:32:14 +0300 Subject: [PATCH 6/8] test: webpack@5 --- test/__snapshots__/icss.test.js.snap | 8 +- test/__snapshots__/import-option.test.js.snap | 344 ++--- .../importLoaders-option.test.js.snap | 16 +- test/__snapshots__/loader.test.js.snap | 8 +- .../__snapshots__/modules-option.test.js.snap | 298 ++-- .../onlyLocals-option.test.js.snap | 14 +- test/__snapshots__/url-option.test.js.snap | 1356 +++++++++++++++++ test/helpers/getExecutedCode.js | 14 +- test/helpers/getModuleSource.js | 2 +- test/icss.test.js | 5 +- test/import-option.test.js | 33 +- test/importLoaders-option.test.js | 33 +- test/loader.test.js | 33 +- test/localsConvention-option.test.js | 39 +- test/modules-option.test.js | 149 +- test/onlyLocals-option.test.js | 9 +- test/sourceMap-option.test.js | 31 +- test/url-option.test.js | 27 +- 18 files changed, 1885 insertions(+), 534 deletions(-) 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 d38d59bc..8cd1fb6c 100644 --- a/test/__snapshots__/url-option.test.js.snap +++ b/test/__snapshots__/url-option.test.js.snap @@ -501,3 +501,1359 @@ Warning (228:3) Unable to find uri in 'background-image: image-set(url('') 1x)'", ] `; + +exports[`"url" option should work with a value equal to "Function": errors 1`] = `Array []`; + +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??[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\\"); +var ___CSS_LOADER_URL_IMPORT_2___ = require(\\"./font.eot\\"); +var ___CSS_LOADER_URL_IMPORT_3___ = require(\\"package/font.ttf\\"); +var ___CSS_LOADER_URL_IMPORT_4___ = require(\\"./font with spaces.eot\\"); +var ___CSS_LOADER_URL_IMPORT_5___ = require(\\"./font.svg\\"); +var ___CSS_LOADER_URL_IMPORT_6___ = require(\\"./font.woff2?foo=bar\\"); +var ___CSS_LOADER_URL_IMPORT_7___ = require(\\"./img1x.png\\"); +var ___CSS_LOADER_URL_IMPORT_8___ = require(\\"./img2x.png\\"); +var ___CSS_LOADER_URL_IMPORT_9___ = require(\\"./img-simple.png\\"); +var ___CSS_LOADER_URL_IMPORT_10___ = require(\\"../url/img-simple.png\\"); +var ___CSS_LOADER_URL_IMPORT_11___ = require(\\"./img3x.png\\"); +var ___CSS_LOADER_URL_IMPORT_12___ = require(\\"./img1x.png?foo=bar\\"); +var ___CSS_LOADER_URL_IMPORT_13___ = require(\\"./img.png\\"); +exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); +exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); +var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___); +var ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___); +var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___); +var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___); +var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___); +var ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___, { hash: \\"#svgFontName\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_6___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___); +var ___CSS_LOADER_URL_REPLACEMENT_7___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___, { hash: \\"?#iefix\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_8___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___, { hash: \\"?#iefix\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_9___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___); +var ___CSS_LOADER_URL_REPLACEMENT_10___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___); +var ___CSS_LOADER_URL_REPLACEMENT_11___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_9___); +var ___CSS_LOADER_URL_REPLACEMENT_12___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_10___); +var ___CSS_LOADER_URL_REPLACEMENT_13___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_14___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_15___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_16___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_17___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___, { hash: \\"#hash\\", needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_18___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___, { hash: \\"?#iefix\\", needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_19___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___); +var ___CSS_LOADER_URL_REPLACEMENT_20___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_13___); +// Module +exports.push([module.id, \\".class {\\\\n background: url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(./img.png);\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\n \\\\\\"./img.png\\\\\\"\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( ./img.png ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(~package/img.png) url(./other-img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,#filter');\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter');\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url(#highlight);\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") format('woff'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") format('eot'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \\") format('truetype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_5___ + \\") format('svg'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_6___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_7___ + \\") format('embedded-opentype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_8___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n body {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: \\\\\\"do not use url(path)\\\\\\";\\\\n}\\\\n\\\\nb {\\\\n content: 'do not \\\\\\"use\\\\\\" url(path)';\\\\n}\\\\n\\\\n@keyframes anim {\\\\n background: green url('./img.png') xyz;\\\\n}\\\\n\\\\n.a {\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x)\\\\n}\\\\n\\\\n.class {\\\\n background: green url() xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url('') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(' ') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\n ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url('./img.png') url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\") url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: ___CSS_LOADER_URL___;\\\\n background: ___CSS_LOADER_URL___INDEX___;\\\\n background: ___CSS_LOADER_URL___99999___;\\\\n background: ___CSS_LOADER_IMPORT___;\\\\n background: ___CSS_LOADER_IMPORT___INDEX___;\\\\n background: ___CSS_LOADER_IMPORT___99999___;\\\\n}\\\\n\\\\n.pure-url {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_11___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_12___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n background: url('~package/img.png');\\\\n}\\\\n\\\\n.aliases {\\\\n background: url('~aliasesImg/img.png') ;\\\\n}\\\\n\\\\na {\\\\n background: url(./nested/img.png);\\\\n}\\\\n\\\\na {\\\\n background: url(nested/img.png);\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n /* Broken */\\\\n background-image: -webkit-image-set();\\\\n background-image: -webkit-image-set('');\\\\n background-image: image-set();\\\\n background-image: image-set('');\\\\n background-image: image-set(\\\\\\"\\\\\\");\\\\n background-image: image-set(\\\\\\"\\\\\\" 1x);\\\\n background-image: image-set(url());\\\\n background-image: image-set(\\\\n url()\\\\n );\\\\n background-image: image-set(URL());\\\\n background-image: image-set(url(''));\\\\n background-image: image-set(url(\\\\\\"\\\\\\"));\\\\n background-image: image-set(url('') 1x);\\\\n background-image: image-set(1x);\\\\n background-image: image-set(\\\\n 1x\\\\n );\\\\n background: image-set(calc(1rem + 1px) 1x);\\\\n\\\\n /* Strings */\\\\n background-image: -webkit-image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n background-image: image-set(\\\\\\"./img img.png\\\\\\" 1x, \\\\\\"./img img.png\\\\\\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x),\\\\n image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n background-image: image-set(\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\" 1x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\" 600dpi\\\\n );\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_16___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_17___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \\" 1x);\\\\n\\\\n /* With \`url\` function */\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x);\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x);\\\\n background-image: -webkit-image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_19___ + \\") 600dpi\\\\n );\\\\n background-image: image-set(url(\\\\\\"./img img.png\\\\\\") 1x, url(\\\\\\"./img img.png\\\\\\") 2x);\\\\n\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\" 2x);\\\\n}\\\\n\\\\n.class {\\\\n /* Not allowed on windows */\\\\n /* background: url(./img\\\\\\\\\\\\\\"img.png); */\\\\n background: url(./img\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\(img.png);\\\\n background: url(./img\\\\\\\\)img.png);\\\\n background: url(./img\\\\\\\\ img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png);\\\\n\\\\n background-image: image-set(\\\\n /* Not allowed on windows */\\\\n /* url(./img\\\\\\\\\\\\\\"img.png) 1x, */\\\\n url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png) 2x,\\\\n url(./img\\\\\\\\'img.png) 3x,\\\\n url(./img\\\\\\\\(img.png) 4x,\\\\n url(./img\\\\\\\\)img.png) 5x,\\\\n url(./img\\\\\\\\ img.png) 6x,\\\\n url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png) 7x\\\\n );\\\\n}\\\\n\\\\n.class-class-class {\\\\n background: url(\\\\\\"./img'''img.png\\\\\\");\\\\n background: url(\\\\\\"./img'() img.png\\\\\\");\\\\n background: url(\\\\\\"./img'img.png\\\\\\");\\\\n background: url(\\\\\\"./img(img.png\\\\\\");\\\\n background: url(\\\\\\"./img)img.png\\\\\\");\\\\n background: url('./img img.png');\\\\n background: url(\\\\\\"./img img.png\\\\\\");\\\\n}\\\\n\\\\n.class.class.class {\\\\n background: url('./img\\\\\\\\\\\\n(img.png');\\\\n background: url('./img\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n(img.png');\\\\n}\\\\n\\\\n.other-test-case {\\\\n background: url(\\\\\\"./img%27%27%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27%28%29%20img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%28img.png\\\\\\");\\\\n background: url(\\\\\\"./img%29img.png\\\\\\");\\\\n background: url(\\\\\\"./img%20img.png\\\\\\");\\\\n background: url(./img%27%27%27img.png);\\\\n background: url(./img%27%28%29%20img.png);\\\\n background: url(./img%27img.png);\\\\n background: url(./img%28img.png);\\\\n background: url(./img%29img.png);\\\\n background: url(./img%20img.png);\\\\n}\\\\n\\\\n.qqq {\\\\n background: url('img.png');\\\\n}\\\\n\\\\n.www {\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\(img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\)img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \\");\\\\n background: url(\\\\\\"./img\\\\\\\\27img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\28%29 img.png\\\\\\");\\\\n background: url(./img\\\\\\\\'\\\\\\\\28%29\\\\\\\\ img.png);\\\\n}\\\\n\\", \\"\\"]); +" +`; + +exports[`"url" option should work with a value equal to "Function": result 1`] = ` +Array [ + Array [ + "../../src/index.js?[ident]!./url/imported.css", + ".bar { + background: url(/webpack/public/path/img-from-imported.png); +} +", + "", + ], + Array [ + "./url/url.css", + ".class { + background: url('./img.png'); +} + +.class { + background: url(\\"./img.png\\"); +} + +.class { + background: url(./img.png); +} + +.class { + background: url(\\"./img.png#hash\\"); +} + +.class { + background: url( + \\"./img.png\\" + ); +} + +.class { + background: green url( './img.png' ) xyz; +} + +.class { + background: green url( \\"./img.png\\" ) xyz; +} + +.class { + background: green url( ./img.png ) xyz; +} + +.class { + background: green url(~package/img.png) url(./other-img.png) xyz; +} + +.class { + background: green url( \\"./img img.png\\" ) xyz; +} + +.class { + background: green url( './img img.png' ) xyz; +} + +.class { + background: green url(/img.png) xyz; +} + +.class { + background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz; +} + +.class { + background-image: url(\\"data:image/svg+xml;charset=utf-8,\\"); +} + +.class { + background-image: url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\"); +} + +.class { + filter: url('data:image/svg+xml;charset=utf-8,#filter'); +} + +.class { + filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter'); +} + +.highlight { + filter: url(#highlight); +} + +.highlight { + filter: url('#line-marker'); +} + +@font-face { + src: url(/webpack/public/path/font.woff) format('woff'), + url(/webpack/public/path/font.woff2) format('woff2'), + url(/webpack/public/path/font.eot) format('eot'), + url(/webpack/public/path/font.ttf) format('truetype'), + url(\\"/webpack/public/path/font with spaces.eot\\") format(\\"embedded-opentype\\"), + url(/webpack/public/path/font.svg#svgFontName) format('svg'), + url(/webpack/public/path/font.woff2) format('woff2'), + url(/webpack/public/path/font.eot?#iefix) format('embedded-opentype'), + url(\\"/webpack/public/path/font with spaces.eot?#iefix\\") format('embedded-opentype'); +} + +@media (min-width: 500px) { + body { + background: url(\\"./img.png\\"); + } +} + +a { + content: \\"do not use url(path)\\"; +} + +b { + content: 'do not \\"use\\" url(path)'; +} + +@keyframes anim { + background: green url('./img.png') xyz; +} + +.a { + background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) +} + +.a { + background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) +} + +.class { + background: green url() xyz; +} + +.class { + background: green url('') xyz; +} + +.class { + background: green url(\\"\\") xyz; +} + +.class { + background: green url(' ') xyz; +} + +.class { + background: green url( + ) xyz; +} + +.class { + background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; +} + +.class { + background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; +} + +.class { + background: url(\\"./img.png?foo\\"); +} + +.class { + background: url(\\"./img.png?foo=bar\\"); +} + +.class { + background: url(\\"./img.png?foo=bar#hash\\"); +} + +.class { + background: url(\\"./img.png?foo=bar#hash\\"); +} + +.class { + background: url(\\"./img.png?\\"); +} + +.class { + background-image: url('./img.png') url(\\"data:image/svg+xml;charset=utf-8,\\") url('./img.png'); +} + +.class { + background: ___CSS_LOADER_URL___; + background: ___CSS_LOADER_URL___INDEX___; + background: ___CSS_LOADER_URL___99999___; + background: ___CSS_LOADER_IMPORT___; + background: ___CSS_LOADER_IMPORT___INDEX___; + background: ___CSS_LOADER_IMPORT___99999___; +} + +.pure-url { + background: url(/webpack/public/path/img-simple.png); +} + +.not-resolved { + background: url('/img-simple.png'); +} + +.above-below { + background: url(/webpack/public/path/img-simple.png); +} + +.tilde { + background: url('~package/img.png'); +} + +.aliases { + background: url('~aliasesImg/img.png') ; +} + +a { + background: url(./nested/img.png); +} + +a { + background: url(nested/img.png); +} + +@font-face { + src: url(\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\"); +} + +.class { + /* Broken */ + background-image: -webkit-image-set(); + background-image: -webkit-image-set(''); + background-image: image-set(); + background-image: image-set(''); + background-image: image-set(\\"\\"); + background-image: image-set(\\"\\" 1x); + background-image: image-set(url()); + background-image: image-set( + url() + ); + background-image: image-set(URL()); + background-image: image-set(url('')); + background-image: image-set(url(\\"\\")); + background-image: image-set(url('') 1x); + background-image: image-set(1x); + background-image: image-set( + 1x + ); + background: image-set(calc(1rem + 1px) 1x); + + /* Strings */ + background-image: -webkit-image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); + background-image: image-set(\\"./img img.png\\" 1x, \\"./img img.png\\" 2x); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x), + image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); + background-image: image-set( + \\"/webpack/public/path/img1x.png\\" 1x, + \\"/webpack/public/path/img2x.png\\" 2x, + \\"/webpack/public/path/img3x.png\\" 600dpi + ); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); + background-image: image-set(\\"/webpack/public/path/img1x.png#hash\\" 1x); + background-image: image-set(\\"/webpack/public/path/img1x.png?#iefix\\" 1x); + + /* With \`url\` function */ + background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); + background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x); + background-image: -webkit-image-set( + url(/webpack/public/path/img1x.png) 1x + ); + background-image: image-set(url(/webpack/public/path/img1x.png) 1x); + background-image: image-set( + url(/webpack/public/path/img1x.png) 1x + ); + background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); + background-image: image-set( + url(/webpack/public/path/img1x.png) 1x, + url(/webpack/public/path/img2x.png) 2x, + url(/webpack/public/path/img3x.png) 600dpi + ); + background-image: image-set(url(\\"./img img.png\\") 1x, url(\\"./img img.png\\") 2x); + + background-image: image-set(url(/webpack/public/path/img1x.png) 1x, \\"/webpack/public/path/img2x.png\\" 2x); +} + +.class { + /* Not allowed on windows */ + /* background: url(./img\\\\\\"img.png); */ + background: url(./img\\\\'img.png); + background: url(./img\\\\'\\\\'\\\\'img.png); + background: url(./img\\\\(img.png); + background: url(./img\\\\)img.png); + background: url(./img\\\\ img.png); + background: url(./img\\\\'\\\\(\\\\)\\\\ img.png); + + background-image: image-set( + /* Not allowed on windows */ + /* url(./img\\\\\\"img.png) 1x, */ + url(./img\\\\'\\\\'\\\\'img.png) 2x, + url(./img\\\\'img.png) 3x, + url(./img\\\\(img.png) 4x, + url(./img\\\\)img.png) 5x, + url(./img\\\\ img.png) 6x, + url(./img\\\\'\\\\(\\\\)\\\\ img.png) 7x + ); +} + +.class-class-class { + background: url(\\"./img'''img.png\\"); + background: url(\\"./img'() img.png\\"); + background: url(\\"./img'img.png\\"); + background: url(\\"./img(img.png\\"); + background: url(\\"./img)img.png\\"); + background: url('./img img.png'); + background: url(\\"./img img.png\\"); +} + +.class.class.class { + background: url('./img\\\\ +(img.png'); + background: url('./img\\\\ +\\\\ +\\\\ +\\\\ +(img.png'); +} + +.other-test-case { + background: url(\\"./img%27%27%27img.png\\"); + background: url(\\"./img%27%28%29%20img.png\\"); + background: url(\\"./img%27img.png\\"); + background: url(\\"./img%28img.png\\"); + background: url(\\"./img%29img.png\\"); + background: url(\\"./img%20img.png\\"); + background: url(./img%27%27%27img.png); + background: url(./img%27%28%29%20img.png); + background: url(./img%27img.png); + background: url(./img%28img.png); + background: url(./img%29img.png); + background: url(./img%20img.png); +} + +.qqq { + background: url('img.png'); +} + +.www { + background: url(\\"./img\\\\'\\\\'\\\\'img.png\\"); + background: url(\\"./img\\\\'\\\\(\\\\)\\\\ img.png\\"); + background: url(\\"./img\\\\'img.png\\"); + background: url(\\"./img\\\\(img.png\\"); + background: url(\\"./img\\\\)img.png\\"); + background: url(\\"./img\\\\ img.png\\"); + background: url(/webpack/public/path/img.png); + background: url(/webpack/public/path/img.png); + background: url(\\"./img\\\\27img.png\\"); + background: url(\\"./img\\\\'\\\\28%29 img.png\\"); + background: url(./img\\\\'\\\\28%29\\\\ img.png); +} +", + "", + ], +] +`; + +exports[`"url" option should work with a value equal to "Function": warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(120:3) Unable to find uri in 'background: green url() xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(124:3) Unable to find uri in 'background: green url('') xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(128:3) Unable to find uri in 'background: green url(\\"\\") xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(132:3) Unable to find uri in 'background: green url(' ') xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(136:3) Unable to find uri in 'background: green url( + ) xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(216:3) Unable to find uri in 'background-image: -webkit-image-set('')'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(218:3) Unable to find uri in 'background-image: image-set('')'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(219:3) Unable to find uri in 'background-image: image-set(\\"\\")'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(220:3) Unable to find uri in 'background-image: image-set(\\"\\" 1x)'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(221:3) Unable to find uri in 'background-image: image-set(url())'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(222:3) Unable to find uri in 'background-image: image-set( + url() + )'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(225:3) Unable to find uri in 'background-image: image-set(URL())'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(226:3) Unable to find uri in 'background-image: image-set(url(''))'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(227:3) Unable to find uri in 'background-image: image-set(url(\\"\\"))'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(228:3) Unable to find uri in 'background-image: image-set(url('') 1x)'", +] +`; + +exports[`"url" option should work with a value equal to "false": errors 1`] = `Array []`; + +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??[ident]!./imported.css\\"); +exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); +exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); +// Module +exports.push([module.id, \\".class {\\\\n background: url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(./img.png);\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\n \\\\\\"./img.png\\\\\\"\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( ./img.png ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(~package/img.png) url(./other-img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\\\\\"./img img.png\\\\\\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( './img img.png' ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,#filter');\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter');\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url(#highlight);\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(./font.woff) format('woff'),\\\\n url('./font.woff2') format('woff2'),\\\\n url(\\\\\\"./font.eot\\\\\\") format('eot'),\\\\n url(~package/font.ttf) format('truetype'),\\\\n url(\\\\\\"./font with spaces.eot\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url('./font.svg#svgFontName') format('svg'),\\\\n url('./font.woff2?foo=bar') format('woff2'),\\\\n url(\\\\\\"./font.eot?#iefix\\\\\\") format('embedded-opentype'),\\\\n url(\\\\\\"./font with spaces.eot?#iefix\\\\\\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n body {\\\\n background: url(\\\\\\"./img.png\\\\\\");\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: \\\\\\"do not use url(path)\\\\\\";\\\\n}\\\\n\\\\nb {\\\\n content: 'do not \\\\\\"use\\\\\\" url(path)';\\\\n}\\\\n\\\\n@keyframes anim {\\\\n background: green url('./img.png') xyz;\\\\n}\\\\n\\\\n.a {\\\\n background-image: -webkit-image-set(url('./img1x.png') 1x, url('./img2x.png') 2x)\\\\n}\\\\n\\\\n.a {\\\\n background-image: image-set(url('./img1x.png') 1x, url('./img2x.png') 2x)\\\\n}\\\\n\\\\n.class {\\\\n background: green url() xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url('') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(' ') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\n ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?foo=bar#hash\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\\\"./img.png?\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url('./img.png') url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\") url('./img.png');\\\\n}\\\\n\\\\n.class {\\\\n background: ___CSS_LOADER_URL___;\\\\n background: ___CSS_LOADER_URL___INDEX___;\\\\n background: ___CSS_LOADER_URL___99999___;\\\\n background: ___CSS_LOADER_IMPORT___;\\\\n background: ___CSS_LOADER_IMPORT___INDEX___;\\\\n background: ___CSS_LOADER_IMPORT___99999___;\\\\n}\\\\n\\\\n.pure-url {\\\\n background: url('img-simple.png');\\\\n}\\\\n\\\\n.not-resolved {\\\\n background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n background: url('../url/img-simple.png');\\\\n}\\\\n\\\\n.tilde {\\\\n background: url('~package/img.png');\\\\n}\\\\n\\\\n.aliases {\\\\n background: url('~aliasesImg/img.png') ;\\\\n}\\\\n\\\\na {\\\\n background: url(./nested/img.png);\\\\n}\\\\n\\\\na {\\\\n background: url(nested/img.png);\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n /* Broken */\\\\n background-image: -webkit-image-set();\\\\n background-image: -webkit-image-set('');\\\\n background-image: image-set();\\\\n background-image: image-set('');\\\\n background-image: image-set(\\\\\\"\\\\\\");\\\\n background-image: image-set(\\\\\\"\\\\\\" 1x);\\\\n background-image: image-set(url());\\\\n background-image: image-set(\\\\n url()\\\\n );\\\\n background-image: image-set(URL());\\\\n background-image: image-set(url(''));\\\\n background-image: image-set(url(\\\\\\"\\\\\\"));\\\\n background-image: image-set(url('') 1x);\\\\n background-image: image-set(1x);\\\\n background-image: image-set(\\\\n 1x\\\\n );\\\\n background: image-set(calc(1rem + 1px) 1x);\\\\n\\\\n /* Strings */\\\\n background-image: -webkit-image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\\\"./img1x.png\\\\\\" 1x);\\\\n background-image: image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\\\"./img img.png\\\\\\" 1x, \\\\\\"./img img.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x),\\\\n image-set(\\\\\\"./img1x.png\\\\\\" 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n background-image: image-set(\\\\n \\\\\\"./img1x.png\\\\\\" 1x,\\\\n \\\\\\"./img2x.png\\\\\\" 2x,\\\\n \\\\\\"./img3x.png\\\\\\" 600dpi\\\\n );\\\\n background-image: image-set(\\\\\\"./img1x.png?foo=bar\\\\\\" 1x);\\\\n background-image: image-set(\\\\\\"./img1x.png#hash\\\\\\" 1x);\\\\n background-image: image-set(\\\\\\"./img1x.png?#iefix\\\\\\" 1x);\\\\n\\\\n /* With \`url\` function */\\\\n background-image: -webkit-image-set(url(\\\\\\"./img1x.png\\\\\\") 1x, url(\\\\\\"./img2x.png\\\\\\") 2x);\\\\n background-image: -webkit-image-set(url(\\\\\\"./img1x.png\\\\\\") 1x);\\\\n background-image: -webkit-image-set(\\\\n url(\\\\\\"./img1x.png\\\\\\") 1x\\\\n );\\\\n background-image: image-set(url(./img1x.png) 1x);\\\\n background-image: image-set(\\\\n url(./img1x.png) 1x\\\\n );\\\\n background-image: image-set(url(\\\\\\"./img1x.png\\\\\\") 1x, url(\\\\\\"./img2x.png\\\\\\") 2x);\\\\n background-image: image-set(\\\\n url(./img1x.png) 1x,\\\\n url(./img2x.png) 2x,\\\\n url(./img3x.png) 600dpi\\\\n );\\\\n background-image: image-set(url(\\\\\\"./img img.png\\\\\\") 1x, url(\\\\\\"./img img.png\\\\\\") 2x);\\\\n\\\\n background-image: image-set(url(\\\\\\"./img1x.png\\\\\\") 1x, \\\\\\"./img2x.png\\\\\\" 2x);\\\\n}\\\\n\\\\n.class {\\\\n /* Not allowed on windows */\\\\n /* background: url(./img\\\\\\\\\\\\\\"img.png); */\\\\n background: url(./img\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png);\\\\n background: url(./img\\\\\\\\(img.png);\\\\n background: url(./img\\\\\\\\)img.png);\\\\n background: url(./img\\\\\\\\ img.png);\\\\n background: url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png);\\\\n\\\\n background-image: image-set(\\\\n /* Not allowed on windows */\\\\n /* url(./img\\\\\\\\\\\\\\"img.png) 1x, */\\\\n url(./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png) 2x,\\\\n url(./img\\\\\\\\'img.png) 3x,\\\\n url(./img\\\\\\\\(img.png) 4x,\\\\n url(./img\\\\\\\\)img.png) 5x,\\\\n url(./img\\\\\\\\ img.png) 6x,\\\\n url(./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png) 7x\\\\n );\\\\n}\\\\n\\\\n.class-class-class {\\\\n background: url(\\\\\\"./img'''img.png\\\\\\");\\\\n background: url(\\\\\\"./img'() img.png\\\\\\");\\\\n background: url(\\\\\\"./img'img.png\\\\\\");\\\\n background: url(\\\\\\"./img(img.png\\\\\\");\\\\n background: url(\\\\\\"./img)img.png\\\\\\");\\\\n background: url('./img img.png');\\\\n background: url(\\\\\\"./img img.png\\\\\\");\\\\n}\\\\n\\\\n.class.class.class {\\\\n background: url('./img\\\\\\\\\\\\n(img.png');\\\\n background: url('./img\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n\\\\\\\\\\\\n(img.png');\\\\n}\\\\n\\\\n.other-test-case {\\\\n background: url(\\\\\\"./img%27%27%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27%28%29%20img.png\\\\\\");\\\\n background: url(\\\\\\"./img%27img.png\\\\\\");\\\\n background: url(\\\\\\"./img%28img.png\\\\\\");\\\\n background: url(\\\\\\"./img%29img.png\\\\\\");\\\\n background: url(\\\\\\"./img%20img.png\\\\\\");\\\\n background: url(./img%27%27%27img.png);\\\\n background: url(./img%27%28%29%20img.png);\\\\n background: url(./img%27img.png);\\\\n background: url(./img%28img.png);\\\\n background: url(./img%29img.png);\\\\n background: url(./img%20img.png);\\\\n}\\\\n\\\\n.qqq {\\\\n background: url('img.png');\\\\n}\\\\n\\\\n.www {\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\'\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\(\\\\\\\\)\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\(img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\)img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\ img.png\\\\\\");\\\\n background: url(\\\\\\"./\\\\\\\\69\\\\\\\\6D\\\\\\\\67.png\\\\\\");\\\\n background: url(./\\\\\\\\69\\\\\\\\6D\\\\\\\\67.png);\\\\n background: url(\\\\\\"./img\\\\\\\\27img.png\\\\\\");\\\\n background: url(\\\\\\"./img\\\\\\\\'\\\\\\\\28%29 img.png\\\\\\");\\\\n background: url(./img\\\\\\\\'\\\\\\\\28%29\\\\\\\\ img.png);\\\\n}\\\\n\\", \\"\\"]); +" +`; + +exports[`"url" option should work with a value equal to "false": result 1`] = ` +Array [ + Array [ + "../../src/index.js?[ident]!./url/imported.css", + ".bar { + background: url('./img-from-imported.png'); +} +", + "", + ], + Array [ + "./url/url.css", + ".class { + background: url('./img.png'); +} + +.class { + background: url(\\"./img.png\\"); +} + +.class { + background: url(./img.png); +} + +.class { + background: url(\\"./img.png#hash\\"); +} + +.class { + background: url( + \\"./img.png\\" + ); +} + +.class { + background: green url( './img.png' ) xyz; +} + +.class { + background: green url( \\"./img.png\\" ) xyz; +} + +.class { + background: green url( ./img.png ) xyz; +} + +.class { + background: green url(~package/img.png) url(./other-img.png) xyz; +} + +.class { + background: green url( \\"./img img.png\\" ) xyz; +} + +.class { + background: green url( './img img.png' ) xyz; +} + +.class { + background: green url(/img.png) xyz; +} + +.class { + background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz; +} + +.class { + background-image: url(\\"data:image/svg+xml;charset=utf-8,\\"); +} + +.class { + background-image: url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\"); +} + +.class { + filter: url('data:image/svg+xml;charset=utf-8,#filter'); +} + +.class { + filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter'); +} + +.highlight { + filter: url(#highlight); +} + +.highlight { + filter: url('#line-marker'); +} + +@font-face { + src: url(./font.woff) format('woff'), + url('./font.woff2') format('woff2'), + url(\\"./font.eot\\") format('eot'), + url(~package/font.ttf) format('truetype'), + url(\\"./font with spaces.eot\\") format(\\"embedded-opentype\\"), + url('./font.svg#svgFontName') format('svg'), + url('./font.woff2?foo=bar') format('woff2'), + url(\\"./font.eot?#iefix\\") format('embedded-opentype'), + url(\\"./font with spaces.eot?#iefix\\") format('embedded-opentype'); +} + +@media (min-width: 500px) { + body { + background: url(\\"./img.png\\"); + } +} + +a { + content: \\"do not use url(path)\\"; +} + +b { + content: 'do not \\"use\\" url(path)'; +} + +@keyframes anim { + background: green url('./img.png') xyz; +} + +.a { + background-image: -webkit-image-set(url('./img1x.png') 1x, url('./img2x.png') 2x) +} + +.a { + background-image: image-set(url('./img1x.png') 1x, url('./img2x.png') 2x) +} + +.class { + background: green url() xyz; +} + +.class { + background: green url('') xyz; +} + +.class { + background: green url(\\"\\") xyz; +} + +.class { + background: green url(' ') xyz; +} + +.class { + background: green url( + ) xyz; +} + +.class { + background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; +} + +.class { + background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; +} + +.class { + background: url(\\"./img.png?foo\\"); +} + +.class { + background: url(\\"./img.png?foo=bar\\"); +} + +.class { + background: url(\\"./img.png?foo=bar#hash\\"); +} + +.class { + background: url(\\"./img.png?foo=bar#hash\\"); +} + +.class { + background: url(\\"./img.png?\\"); +} + +.class { + background-image: url('./img.png') url(\\"data:image/svg+xml;charset=utf-8,\\") url('./img.png'); +} + +.class { + background: ___CSS_LOADER_URL___; + background: ___CSS_LOADER_URL___INDEX___; + background: ___CSS_LOADER_URL___99999___; + background: ___CSS_LOADER_IMPORT___; + background: ___CSS_LOADER_IMPORT___INDEX___; + background: ___CSS_LOADER_IMPORT___99999___; +} + +.pure-url { + background: url('img-simple.png'); +} + +.not-resolved { + background: url('/img-simple.png'); +} + +.above-below { + background: url('../url/img-simple.png'); +} + +.tilde { + background: url('~package/img.png'); +} + +.aliases { + background: url('~aliasesImg/img.png') ; +} + +a { + background: url(./nested/img.png); +} + +a { + background: url(nested/img.png); +} + +@font-face { + src: url(\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\"); +} + +.class { + /* Broken */ + background-image: -webkit-image-set(); + background-image: -webkit-image-set(''); + background-image: image-set(); + background-image: image-set(''); + background-image: image-set(\\"\\"); + background-image: image-set(\\"\\" 1x); + background-image: image-set(url()); + background-image: image-set( + url() + ); + background-image: image-set(URL()); + background-image: image-set(url('')); + background-image: image-set(url(\\"\\")); + background-image: image-set(url('') 1x); + background-image: image-set(1x); + background-image: image-set( + 1x + ); + background: image-set(calc(1rem + 1px) 1x); + + /* Strings */ + background-image: -webkit-image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x); + background-image: image-set(\\"./img1x.png\\" 1x); + background-image: image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x); + background-image: image-set(\\"./img img.png\\" 1x, \\"./img img.png\\" 2x); + background-image: image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x), + image-set(\\"./img1x.png\\" 1x, \\"./img2x.png\\" 2x); + background-image: image-set( + \\"./img1x.png\\" 1x, + \\"./img2x.png\\" 2x, + \\"./img3x.png\\" 600dpi + ); + background-image: image-set(\\"./img1x.png?foo=bar\\" 1x); + background-image: image-set(\\"./img1x.png#hash\\" 1x); + background-image: image-set(\\"./img1x.png?#iefix\\" 1x); + + /* With \`url\` function */ + background-image: -webkit-image-set(url(\\"./img1x.png\\") 1x, url(\\"./img2x.png\\") 2x); + background-image: -webkit-image-set(url(\\"./img1x.png\\") 1x); + background-image: -webkit-image-set( + url(\\"./img1x.png\\") 1x + ); + background-image: image-set(url(./img1x.png) 1x); + background-image: image-set( + url(./img1x.png) 1x + ); + background-image: image-set(url(\\"./img1x.png\\") 1x, url(\\"./img2x.png\\") 2x); + background-image: image-set( + url(./img1x.png) 1x, + url(./img2x.png) 2x, + url(./img3x.png) 600dpi + ); + background-image: image-set(url(\\"./img img.png\\") 1x, url(\\"./img img.png\\") 2x); + + background-image: image-set(url(\\"./img1x.png\\") 1x, \\"./img2x.png\\" 2x); +} + +.class { + /* Not allowed on windows */ + /* background: url(./img\\\\\\"img.png); */ + background: url(./img\\\\'img.png); + background: url(./img\\\\'\\\\'\\\\'img.png); + background: url(./img\\\\(img.png); + background: url(./img\\\\)img.png); + background: url(./img\\\\ img.png); + background: url(./img\\\\'\\\\(\\\\)\\\\ img.png); + + background-image: image-set( + /* Not allowed on windows */ + /* url(./img\\\\\\"img.png) 1x, */ + url(./img\\\\'\\\\'\\\\'img.png) 2x, + url(./img\\\\'img.png) 3x, + url(./img\\\\(img.png) 4x, + url(./img\\\\)img.png) 5x, + url(./img\\\\ img.png) 6x, + url(./img\\\\'\\\\(\\\\)\\\\ img.png) 7x + ); +} + +.class-class-class { + background: url(\\"./img'''img.png\\"); + background: url(\\"./img'() img.png\\"); + background: url(\\"./img'img.png\\"); + background: url(\\"./img(img.png\\"); + background: url(\\"./img)img.png\\"); + background: url('./img img.png'); + background: url(\\"./img img.png\\"); +} + +.class.class.class { + background: url('./img\\\\ +(img.png'); + background: url('./img\\\\ +\\\\ +\\\\ +\\\\ +(img.png'); +} + +.other-test-case { + background: url(\\"./img%27%27%27img.png\\"); + background: url(\\"./img%27%28%29%20img.png\\"); + background: url(\\"./img%27img.png\\"); + background: url(\\"./img%28img.png\\"); + background: url(\\"./img%29img.png\\"); + background: url(\\"./img%20img.png\\"); + background: url(./img%27%27%27img.png); + background: url(./img%27%28%29%20img.png); + background: url(./img%27img.png); + background: url(./img%28img.png); + background: url(./img%29img.png); + background: url(./img%20img.png); +} + +.qqq { + background: url('img.png'); +} + +.www { + background: url(\\"./img\\\\'\\\\'\\\\'img.png\\"); + background: url(\\"./img\\\\'\\\\(\\\\)\\\\ img.png\\"); + background: url(\\"./img\\\\'img.png\\"); + background: url(\\"./img\\\\(img.png\\"); + background: url(\\"./img\\\\)img.png\\"); + background: url(\\"./img\\\\ img.png\\"); + background: url(\\"./\\\\69\\\\6D\\\\67.png\\"); + background: url(./\\\\69\\\\6D\\\\67.png); + background: url(\\"./img\\\\27img.png\\"); + background: url(\\"./img\\\\'\\\\28%29 img.png\\"); + background: url(./img\\\\'\\\\28%29\\\\ img.png); +} +", + "", + ], +] +`; + +exports[`"url" option should work with a value equal to "false": warnings 1`] = `Array []`; + +exports[`"url" option should work with a value equal to "true": errors 1`] = `Array []`; + +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??[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\\"); +var ___CSS_LOADER_URL_IMPORT_2___ = require(\\"./other-img.png\\"); +var ___CSS_LOADER_URL_IMPORT_3___ = require(\\"./img img.png\\"); +var ___CSS_LOADER_URL_IMPORT_4___ = require(\\"./font.woff\\"); +var ___CSS_LOADER_URL_IMPORT_5___ = require(\\"./font.woff2\\"); +var ___CSS_LOADER_URL_IMPORT_6___ = require(\\"./font.eot\\"); +var ___CSS_LOADER_URL_IMPORT_7___ = require(\\"package/font.ttf\\"); +var ___CSS_LOADER_URL_IMPORT_8___ = require(\\"./font with spaces.eot\\"); +var ___CSS_LOADER_URL_IMPORT_9___ = require(\\"./font.svg\\"); +var ___CSS_LOADER_URL_IMPORT_10___ = require(\\"./font.woff2?foo=bar\\"); +var ___CSS_LOADER_URL_IMPORT_11___ = require(\\"./img1x.png\\"); +var ___CSS_LOADER_URL_IMPORT_12___ = require(\\"./img2x.png\\"); +var ___CSS_LOADER_URL_IMPORT_13___ = require(\\"./img.png?foo\\"); +var ___CSS_LOADER_URL_IMPORT_14___ = require(\\"./img.png?foo=bar\\"); +var ___CSS_LOADER_URL_IMPORT_15___ = require(\\"./img.png?\\"); +var ___CSS_LOADER_URL_IMPORT_16___ = require(\\"./img-simple.png\\"); +var ___CSS_LOADER_URL_IMPORT_17___ = require(\\"../url/img-simple.png\\"); +var ___CSS_LOADER_URL_IMPORT_18___ = require(\\"aliasesImg/img.png\\"); +var ___CSS_LOADER_URL_IMPORT_19___ = require(\\"./nested/img.png\\"); +var ___CSS_LOADER_URL_IMPORT_20___ = require(\\"./img3x.png\\"); +var ___CSS_LOADER_URL_IMPORT_21___ = require(\\"./img1x.png?foo=bar\\"); +var ___CSS_LOADER_URL_IMPORT_22___ = require(\\"./img'img.png\\"); +var ___CSS_LOADER_URL_IMPORT_23___ = require(\\"./img'''img.png\\"); +var ___CSS_LOADER_URL_IMPORT_24___ = require(\\"./img(img.png\\"); +var ___CSS_LOADER_URL_IMPORT_25___ = require(\\"./img)img.png\\"); +var ___CSS_LOADER_URL_IMPORT_26___ = require(\\"./img'() img.png\\"); +exports = module.exports = ___CSS_LOADER_API_IMPORT___(false); +exports.i(___CSS_LOADER_AT_RULE_IMPORT_0___); +var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___); +var ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___, { hash: \\"#hash\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___); +var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___); +var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___); +var ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___); +var ___CSS_LOADER_URL_REPLACEMENT_6___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___); +var ___CSS_LOADER_URL_REPLACEMENT_7___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___); +var ___CSS_LOADER_URL_REPLACEMENT_8___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_7___); +var ___CSS_LOADER_URL_REPLACEMENT_9___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___); +var ___CSS_LOADER_URL_REPLACEMENT_10___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_9___, { hash: \\"#svgFontName\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_11___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_10___); +var ___CSS_LOADER_URL_REPLACEMENT_12___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_6___, { hash: \\"?#iefix\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_13___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_8___, { hash: \\"?#iefix\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_14___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___); +var ___CSS_LOADER_URL_REPLACEMENT_15___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___); +var ___CSS_LOADER_URL_REPLACEMENT_16___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_13___); +var ___CSS_LOADER_URL_REPLACEMENT_17___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_14___); +var ___CSS_LOADER_URL_REPLACEMENT_18___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_14___, { hash: \\"#hash\\" }); +var ___CSS_LOADER_URL_REPLACEMENT_19___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_15___); +var ___CSS_LOADER_URL_REPLACEMENT_20___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_16___); +var ___CSS_LOADER_URL_REPLACEMENT_21___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_17___); +var ___CSS_LOADER_URL_REPLACEMENT_22___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_18___); +var ___CSS_LOADER_URL_REPLACEMENT_23___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_19___); +var ___CSS_LOADER_URL_REPLACEMENT_24___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_25___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_12___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_26___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_27___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_20___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_28___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_21___, { needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_29___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { hash: \\"#hash\\", needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_30___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_11___, { hash: \\"?#iefix\\", needQuotes: true }); +var ___CSS_LOADER_URL_REPLACEMENT_31___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_20___); +var ___CSS_LOADER_URL_REPLACEMENT_32___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_22___); +var ___CSS_LOADER_URL_REPLACEMENT_33___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_23___); +var ___CSS_LOADER_URL_REPLACEMENT_34___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_24___); +var ___CSS_LOADER_URL_REPLACEMENT_35___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_25___); +var ___CSS_LOADER_URL_REPLACEMENT_36___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_26___); +// Module +exports.push([module.id, \\".class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") url(\\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url( \\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,#filter');\\\\n}\\\\n\\\\n.class {\\\\n filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter');\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url(#highlight);\\\\n}\\\\n\\\\n.highlight {\\\\n filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_5___ + \\") format('woff'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_6___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_7___ + \\") format('eot'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_8___ + \\") format('truetype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_10___ + \\") format('svg'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_11___ + \\") format('woff2'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_12___ + \\") format('embedded-opentype'),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n body {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n }\\\\n}\\\\n\\\\na {\\\\n content: \\\\\\"do not use url(path)\\\\\\";\\\\n}\\\\n\\\\nb {\\\\n content: 'do not \\\\\\"use\\\\\\" url(path)';\\\\n}\\\\n\\\\n@keyframes anim {\\\\n background: green url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") xyz;\\\\n}\\\\n\\\\n.a {\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x)\\\\n}\\\\n\\\\n.class {\\\\n background: green url() xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url('') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(' ') xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(\\\\n ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_16___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_17___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_19___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background-image: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,\\\\\\") url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n background: ___CSS_LOADER_URL___;\\\\n background: ___CSS_LOADER_URL___INDEX___;\\\\n background: ___CSS_LOADER_URL___99999___;\\\\n background: ___CSS_LOADER_IMPORT___;\\\\n background: ___CSS_LOADER_IMPORT___INDEX___;\\\\n background: ___CSS_LOADER_IMPORT___99999___;\\\\n}\\\\n\\\\n.pure-url {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_20___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_21___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\");\\\\n}\\\\n\\\\n.aliases {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_22___ + \\");\\\\n}\\\\n\\\\na {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_23___ + \\");\\\\n}\\\\n\\\\na {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_23___ + \\");\\\\n}\\\\n\\\\n@font-face {\\\\n src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n /* Broken */\\\\n background-image: -webkit-image-set();\\\\n background-image: -webkit-image-set('');\\\\n background-image: image-set();\\\\n background-image: image-set('');\\\\n background-image: image-set(\\\\\\"\\\\\\");\\\\n background-image: image-set(\\\\\\"\\\\\\" 1x);\\\\n background-image: image-set(url());\\\\n background-image: image-set(\\\\n url()\\\\n );\\\\n background-image: image-set(URL());\\\\n background-image: image-set(url(''));\\\\n background-image: image-set(url(\\\\\\"\\\\\\"));\\\\n background-image: image-set(url('') 1x);\\\\n background-image: image-set(1x);\\\\n background-image: image-set(\\\\n 1x\\\\n );\\\\n background: image-set(calc(1rem + 1px) 1x);\\\\n\\\\n /* Strings */\\\\n background-image: -webkit-image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_26___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_26___ + \\" 2x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x),\\\\n image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n background-image: image-set(\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_24___ + \\" 1x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x,\\\\n \\" + ___CSS_LOADER_URL_REPLACEMENT_27___ + \\" 600dpi\\\\n );\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_28___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_29___ + \\" 1x);\\\\n background-image: image-set(\\" + ___CSS_LOADER_URL_REPLACEMENT_30___ + \\" 1x);\\\\n\\\\n /* With \`url\` function */\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x);\\\\n background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x);\\\\n background-image: -webkit-image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x);\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_15___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_31___ + \\") 600dpi\\\\n );\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") 2x);\\\\n\\\\n background-image: image-set(url(\\" + ___CSS_LOADER_URL_REPLACEMENT_14___ + \\") 1x, \\" + ___CSS_LOADER_URL_REPLACEMENT_25___ + \\" 2x);\\\\n}\\\\n\\\\n.class {\\\\n /* Not allowed on windows */\\\\n /* background: url(./img\\\\\\\\\\\\\\"img.png); */\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n\\\\n background-image: image-set(\\\\n \\\\n \\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\") 3x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\") 4x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\") 5x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") 6x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\") 7x\\\\n );\\\\n}\\\\n\\\\n.class-class-class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n}\\\\n\\\\n.class.class.class {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n}\\\\n\\\\n.other-test-case {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n}\\\\n\\\\n.qqq {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.www {\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_33___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_34___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_35___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_32___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n background: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_36___ + \\");\\\\n}\\\\n\\", \\"\\"]); +" +`; + +exports[`"url" option should work with a value equal to "true": result 1`] = ` +Array [ + Array [ + "../../src/index.js?[ident]!./url/imported.css", + ".bar { + background: url(/webpack/public/path/img-from-imported.png); +} +", + "", + ], + Array [ + "./url/url.css", + ".class { + background: url(/webpack/public/path/img.png); +} + +.class { + background: url(/webpack/public/path/img.png); +} + +.class { + background: url(/webpack/public/path/img.png); +} + +.class { + background: url(/webpack/public/path/img.png#hash); +} + +.class { + background: url( + /webpack/public/path/img.png + ); +} + +.class { + background: green url( /webpack/public/path/img.png ) xyz; +} + +.class { + background: green url( /webpack/public/path/img.png ) xyz; +} + +.class { + background: green url( /webpack/public/path/img.png ) xyz; +} + +.class { + background: green url(/webpack/public/path/img.png) url(/webpack/public/path/other-img.png) xyz; +} + +.class { + background: green url( \\"/webpack/public/path/img img.png\\" ) xyz; +} + +.class { + background: green url( \\"/webpack/public/path/img img.png\\" ) xyz; +} + +.class { + background: green url(/img.png) xyz; +} + +.class { + background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz; +} + +.class { + background-image: url(\\"data:image/svg+xml;charset=utf-8,\\"); +} + +.class { + background-image: url(\\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2042%2026%27%20fill%3D%27%2523007aff%27%3E%3Crect%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%271%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2711%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2712%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3Crect%20y%3D%2722%27%20width%3D%274%27%20height%3D%274%27%2F%3E%3Crect%20x%3D%278%27%20y%3D%2723%27%20width%3D%2734%27%20height%3D%272%27%2F%3E%3C%2Fsvg%3E\\"); +} + +.class { + filter: url('data:image/svg+xml;charset=utf-8,#filter'); +} + +.class { + filter: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%5C%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%5C%22%3E%3Cfilter%20id%3D%5C%22filter%5C%22%3E%3CfeGaussianBlur%20in%3D%5C%22SourceAlpha%5C%22%20stdDeviation%3D%5C%220%5C%22%20%2F%3E%3CfeOffset%20dx%3D%5C%221%5C%22%20dy%3D%5C%222%5C%22%20result%3D%5C%22offsetblur%5C%22%20%2F%3E%3CfeFlood%20flood-color%3D%5C%22rgba(255%2C255%2C255%2C1)%5C%22%20%2F%3E%3CfeComposite%20in2%3D%5C%22offsetblur%5C%22%20operator%3D%5C%22in%5C%22%20%2F%3E%3CfeMerge%3E%3CfeMergeNode%20%2F%3E%3CfeMergeNode%20in%3D%5C%22SourceGraphic%5C%22%20%2F%3E%3C%2FfeMerge%3E%3C%2Ffilter%3E%3C%2Fsvg%3E%23filter'); +} + +.highlight { + filter: url(#highlight); +} + +.highlight { + filter: url('#line-marker'); +} + +@font-face { + src: url(/webpack/public/path/font.woff) format('woff'), + url(/webpack/public/path/font.woff2) format('woff2'), + url(/webpack/public/path/font.eot) format('eot'), + url(/webpack/public/path/font.ttf) format('truetype'), + url(\\"/webpack/public/path/font with spaces.eot\\") format(\\"embedded-opentype\\"), + url(/webpack/public/path/font.svg#svgFontName) format('svg'), + url(/webpack/public/path/font.woff2) format('woff2'), + url(/webpack/public/path/font.eot?#iefix) format('embedded-opentype'), + url(\\"/webpack/public/path/font with spaces.eot?#iefix\\") format('embedded-opentype'); +} + +@media (min-width: 500px) { + body { + background: url(/webpack/public/path/img.png); + } +} + +a { + content: \\"do not use url(path)\\"; +} + +b { + content: 'do not \\"use\\" url(path)'; +} + +@keyframes anim { + background: green url(/webpack/public/path/img.png) xyz; +} + +.a { + background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) +} + +.a { + background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x) +} + +.class { + background: green url() xyz; +} + +.class { + background: green url('') xyz; +} + +.class { + background: green url(\\"\\") xyz; +} + +.class { + background: green url(' ') xyz; +} + +.class { + background: green url( + ) xyz; +} + +.class { + background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; +} + +.class { + background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz; +} + +.class { + background: url(/webpack/public/path/img.png); +} + +.class { + background: url(/webpack/public/path/img.png); +} + +.class { + background: url(/webpack/public/path/img.png#hash); +} + +.class { + background: url(/webpack/public/path/img.png#hash); +} + +.class { + background: url(/webpack/public/path/img.png); +} + +.class { + background-image: url(/webpack/public/path/img.png) url(\\"data:image/svg+xml;charset=utf-8,\\") url(/webpack/public/path/img.png); +} + +.class { + background: ___CSS_LOADER_URL___; + background: ___CSS_LOADER_URL___INDEX___; + background: ___CSS_LOADER_URL___99999___; + background: ___CSS_LOADER_IMPORT___; + background: ___CSS_LOADER_IMPORT___INDEX___; + background: ___CSS_LOADER_IMPORT___99999___; +} + +.pure-url { + background: url(/webpack/public/path/img-simple.png); +} + +.not-resolved { + background: url('/img-simple.png'); +} + +.above-below { + background: url(/webpack/public/path/img-simple.png); +} + +.tilde { + background: url(/webpack/public/path/img.png); +} + +.aliases { + background: url(/webpack/public/path/img.png); +} + +a { + background: url(/webpack/public/path/img.png); +} + +a { + background: url(/webpack/public/path/img.png); +} + +@font-face { + src: url(\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\"); +} + +.class { + /* Broken */ + background-image: -webkit-image-set(); + background-image: -webkit-image-set(''); + background-image: image-set(); + background-image: image-set(''); + background-image: image-set(\\"\\"); + background-image: image-set(\\"\\" 1x); + background-image: image-set(url()); + background-image: image-set( + url() + ); + background-image: image-set(URL()); + background-image: image-set(url('')); + background-image: image-set(url(\\"\\")); + background-image: image-set(url('') 1x); + background-image: image-set(1x); + background-image: image-set( + 1x + ); + background: image-set(calc(1rem + 1px) 1x); + + /* Strings */ + background-image: -webkit-image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); + background-image: image-set(\\"/webpack/public/path/img img.png\\" 1x, \\"/webpack/public/path/img img.png\\" 2x); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x), + image-set(\\"/webpack/public/path/img1x.png\\" 1x, \\"/webpack/public/path/img2x.png\\" 2x); + background-image: image-set( + \\"/webpack/public/path/img1x.png\\" 1x, + \\"/webpack/public/path/img2x.png\\" 2x, + \\"/webpack/public/path/img3x.png\\" 600dpi + ); + background-image: image-set(\\"/webpack/public/path/img1x.png\\" 1x); + background-image: image-set(\\"/webpack/public/path/img1x.png#hash\\" 1x); + background-image: image-set(\\"/webpack/public/path/img1x.png?#iefix\\" 1x); + + /* With \`url\` function */ + background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); + background-image: -webkit-image-set(url(/webpack/public/path/img1x.png) 1x); + background-image: -webkit-image-set( + url(/webpack/public/path/img1x.png) 1x + ); + background-image: image-set(url(/webpack/public/path/img1x.png) 1x); + background-image: image-set( + url(/webpack/public/path/img1x.png) 1x + ); + background-image: image-set(url(/webpack/public/path/img1x.png) 1x, url(/webpack/public/path/img2x.png) 2x); + background-image: image-set( + url(/webpack/public/path/img1x.png) 1x, + url(/webpack/public/path/img2x.png) 2x, + url(/webpack/public/path/img3x.png) 600dpi + ); + background-image: image-set(url(\\"/webpack/public/path/img img.png\\") 1x, url(\\"/webpack/public/path/img img.png\\") 2x); + + background-image: image-set(url(/webpack/public/path/img1x.png) 1x, \\"/webpack/public/path/img2x.png\\" 2x); +} + +.class { + /* Not allowed on windows */ + /* background: url(./img\\\\\\"img.png); */ + background: url(\\"/webpack/public/path/img'img.png\\"); + background: url(\\"/webpack/public/path/img'''img.png\\"); + background: url(\\"/webpack/public/path/img(img.png\\"); + background: url(\\"/webpack/public/path/img)img.png\\"); + background: url(\\"/webpack/public/path/img img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); + + background-image: image-set( + + + url(\\"/webpack/public/path/img'''img.png\\") 2x, + url(\\"/webpack/public/path/img'img.png\\") 3x, + url(\\"/webpack/public/path/img(img.png\\") 4x, + url(\\"/webpack/public/path/img)img.png\\") 5x, + url(\\"/webpack/public/path/img img.png\\") 6x, + url(\\"/webpack/public/path/img'() img.png\\") 7x + ); +} + +.class-class-class { + background: url(\\"/webpack/public/path/img'''img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); + background: url(\\"/webpack/public/path/img'img.png\\"); + background: url(\\"/webpack/public/path/img(img.png\\"); + background: url(\\"/webpack/public/path/img)img.png\\"); + background: url(\\"/webpack/public/path/img img.png\\"); + background: url(\\"/webpack/public/path/img img.png\\"); +} + +.class.class.class { + background: url(\\"/webpack/public/path/img(img.png\\"); + background: url(\\"/webpack/public/path/img(img.png\\"); +} + +.other-test-case { + background: url(\\"/webpack/public/path/img'''img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); + background: url(\\"/webpack/public/path/img'img.png\\"); + background: url(\\"/webpack/public/path/img(img.png\\"); + background: url(\\"/webpack/public/path/img)img.png\\"); + background: url(\\"/webpack/public/path/img img.png\\"); + background: url(\\"/webpack/public/path/img'''img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); + background: url(\\"/webpack/public/path/img'img.png\\"); + background: url(\\"/webpack/public/path/img(img.png\\"); + background: url(\\"/webpack/public/path/img)img.png\\"); + background: url(\\"/webpack/public/path/img img.png\\"); +} + +.qqq { + background: url(/webpack/public/path/img.png); +} + +.www { + background: url(\\"/webpack/public/path/img'''img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); + background: url(\\"/webpack/public/path/img'img.png\\"); + background: url(\\"/webpack/public/path/img(img.png\\"); + background: url(\\"/webpack/public/path/img)img.png\\"); + background: url(\\"/webpack/public/path/img img.png\\"); + background: url(/webpack/public/path/img.png); + background: url(/webpack/public/path/img.png); + background: url(\\"/webpack/public/path/img'img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); + background: url(\\"/webpack/public/path/img'() img.png\\"); +} +", + "", + ], +] +`; + +exports[`"url" option should work with a value equal to "true": warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(120:3) Unable to find uri in 'background: green url() xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(124:3) Unable to find uri in 'background: green url('') xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(128:3) Unable to find uri in 'background: green url(\\"\\") xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(132:3) Unable to find uri in 'background: green url(' ') xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(136:3) Unable to find uri in 'background: green url( + ) xyz'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(216:3) Unable to find uri in 'background-image: -webkit-image-set('')'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(218:3) Unable to find uri in 'background-image: image-set('')'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(219:3) Unable to find uri in 'background-image: image-set(\\"\\")'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(220:3) Unable to find uri in 'background-image: image-set(\\"\\" 1x)'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(221:3) Unable to find uri in 'background-image: image-set(url())'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(222:3) Unable to find uri in 'background-image: image-set( + url() + )'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(225:3) Unable to find uri in 'background-image: image-set(URL())'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(226:3) Unable to find uri in 'background-image: image-set(url(''))'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(227:3) Unable to find uri in 'background-image: image-set(url(\\"\\"))'", + "ModuleWarning: Module Warning (from \`replaced original path\`): +Warning + +(228:3) Unable to find uri in 'background-image: image-set(url('') 1x)'", +] +`; diff --git a/test/helpers/getExecutedCode.js b/test/helpers/getExecutedCode.js index eb5b8632..d2d0b24d 100644 --- a/test/helpers/getExecutedCode.js +++ b/test/helpers/getExecutedCode.js @@ -3,13 +3,15 @@ import { execute, readAsset } from './index'; export default (asset, compiler, stats) => { let executed = execute(readAsset(asset, compiler, stats)); - executed = executed.map((module) => { - // Todo remove after drop webpack@4 - // eslint-disable-next-line no-param-reassign - module[0] = module[0].replace(/\?.*!/, '?[ident]!'); + 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 module; + }); + } return executed; }; diff --git a/test/helpers/getModuleSource.js b/test/helpers/getModuleSource.js index 8340fa41..fd60583b 100644 --- a/test/helpers/getModuleSource.js +++ b/test/helpers/getModuleSource.js @@ -4,7 +4,7 @@ export default (id, stats) => { let { source } = module; // Todo remove after drop webpack@4 support - source = source.replace(/\?\?.*!/, '??[ident]!'); + source = source.replace(/\?\?.*!/g, '??[ident]!'); return source; }; 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..d4236766 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'); }); @@ -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'); }); @@ -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'); }); @@ -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..5d708d18 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'); }); 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..156ceb60 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'); }); @@ -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'); }); From 691d01feaa98d94f062b4d4e8473398354d3ca2c Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 17:36:53 +0300 Subject: [PATCH 7/8] test: webpack@5 --- test/__snapshots__/loader.test.js.snap | 8 ------- .../__snapshots__/modules-option.test.js.snap | 22 ------------------- test/importLoaders-option.test.js | 6 ++--- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index 005a280e..9a9e040f 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -139,14 +139,6 @@ Array [ exports[`loader should work with "sass-loader": warnings 1`] = `Array []`; -exports[`loader should work with ModuleConcatenationPlugin (file-loader): errors 1`] = `Array []`; - -exports[`loader should work with ModuleConcatenationPlugin (file-loader): warnings 1`] = `Array []`; - -exports[`loader should work with ModuleConcatenationPlugin (url-loader): errors 1`] = `Array []`; - -exports[`loader should work with ModuleConcatenationPlugin (url-loader): warnings 1`] = `Array []`; - exports[`loader should work with empty css: errors 1`] = `Array []`; exports[`loader should work with empty css: module 1`] = ` diff --git a/test/__snapshots__/modules-option.test.js.snap b/test/__snapshots__/modules-option.test.js.snap index baf5825a..af4a1a79 100644 --- a/test/__snapshots__/modules-option.test.js.snap +++ b/test/__snapshots__/modules-option.test.js.snap @@ -35,8 +35,6 @@ Array [ exports[`"modules" option issue #286: warnings 1`] = `Array []`; -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\\"); @@ -51,26 +49,6 @@ exports.locals = { };" `; -exports[`"modules" option issue #636: result 1`] = ` -Array [ - Array [ - "../../src/index.js?[ident]!./modules/issue-636/foo.scss", - ".prefix-foo { - color: red; -}", - "", - ], - Array [ - "./modules/issue-636/source.scss", - ".prefix-bar { -}", - "", - ], -] -`; - -exports[`"modules" option issue #636: warnings 1`] = `Array []`; - exports[`"modules" option issue #861: errors 1`] = `Array []`; exports[`"modules" option issue #861: module 1`] = ` diff --git a/test/importLoaders-option.test.js b/test/importLoaders-option.test.js index d4236766..96a2929a 100644 --- a/test/importLoaders-option.test.js +++ b/test/importLoaders-option.test.js @@ -56,7 +56,7 @@ describe('"importLoaders" option', () => { rules: [ { test: /\.css$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { importLoaders: 0 }, @@ -107,7 +107,7 @@ describe('"importLoaders" option', () => { rules: [ { test: /\.css$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { importLoaders: 1 }, @@ -144,7 +144,7 @@ describe('"importLoaders" option', () => { rules: [ { test: /\.css$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: { importLoaders: 2 }, From 5e88899bf77c62c2cfd1438db0c89996c723237c Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Mon, 16 Dec 2019 17:40:36 +0300 Subject: [PATCH 8/8] test: webpack@5 --- test/__snapshots__/loader.test.js.snap | 8 +++++++ .../__snapshots__/modules-option.test.js.snap | 22 +++++++++++++++++++ test/loader.test.js | 14 ++++++++++-- test/modules-option.test.js | 2 +- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index 9a9e040f..005a280e 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -139,6 +139,14 @@ Array [ exports[`loader should work with "sass-loader": warnings 1`] = `Array []`; +exports[`loader should work with ModuleConcatenationPlugin (file-loader): errors 1`] = `Array []`; + +exports[`loader should work with ModuleConcatenationPlugin (file-loader): warnings 1`] = `Array []`; + +exports[`loader should work with ModuleConcatenationPlugin (url-loader): errors 1`] = `Array []`; + +exports[`loader should work with ModuleConcatenationPlugin (url-loader): warnings 1`] = `Array []`; + exports[`loader should work with empty css: errors 1`] = `Array []`; exports[`loader should work with empty css: module 1`] = ` diff --git a/test/__snapshots__/modules-option.test.js.snap b/test/__snapshots__/modules-option.test.js.snap index af4a1a79..baf5825a 100644 --- a/test/__snapshots__/modules-option.test.js.snap +++ b/test/__snapshots__/modules-option.test.js.snap @@ -35,6 +35,8 @@ Array [ exports[`"modules" option issue #286: warnings 1`] = `Array []`; +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\\"); @@ -49,6 +51,26 @@ exports.locals = { };" `; +exports[`"modules" option issue #636: result 1`] = ` +Array [ + Array [ + "../../src/index.js?[ident]!./modules/issue-636/foo.scss", + ".prefix-foo { + color: red; +}", + "", + ], + Array [ + "./modules/issue-636/source.scss", + ".prefix-bar { +}", + "", + ], +] +`; + +exports[`"modules" option issue #636: warnings 1`] = `Array []`; + exports[`"modules" option issue #861: errors 1`] = `Array []`; exports[`"modules" option issue #861: module 1`] = ` diff --git a/test/loader.test.js b/test/loader.test.js index 5d708d18..40af0f9b 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -177,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'); }); @@ -205,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/modules-option.test.js b/test/modules-option.test.js index 156ceb60..d16e5927 100644 --- a/test/modules-option.test.js +++ b/test/modules-option.test.js @@ -380,7 +380,7 @@ describe('"modules" option', () => { rules: [ { test: /\.s[ca]ss$/i, - rules: [ + use: [ { loader: path.resolve(__dirname, '../src'), options: {