Skip to content

Commit f0fc337

Browse files
feat: issue 1256
1 parent 2152535 commit f0fc337

File tree

6 files changed

+138
-80
lines changed

6 files changed

+138
-80
lines changed

Diff for: README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ module.exports = {
11321132

11331133
## Examples
11341134

1135-
### Disabling sources resolving using the `/* webpackIgnore: true */` comment
1135+
### Disable url resolving using the `/* webpackIgnore: true */` comment
11361136

11371137
With the help of the `/* webpackIgnore: true */`comment, it is possible to disable sources handling for rules and for individual declarations.
11381138

@@ -1143,23 +1143,35 @@ With the help of the `/* webpackIgnore: true */`comment, it is possible to disab
11431143

11441144
/** webpackIgnore: true */
11451145
.class {
1146+
/* Disabled url handling for the all .class */
11461147
color: red;
11471148
background: url("./url/img.png");
11481149
}
11491150

11501151
.class {
1152+
/* Disabled url handling for the first url in 'background' declaration */
11511153
color: red;
1152-
background: /** webpackIgnore: true */ url("./url/img.png");
1154+
background: /** webpackIgnore: true */ url("./url/img.png"),
1155+
url("./url/img.png");
1156+
}
1157+
.class {
1158+
/* Disabled url handling for the all urls in 'background' declaration */
1159+
color: red;
1160+
/** webpackIgnore: true */
1161+
background: url("./url/img.png"), url("./url/img.png");
11531162
}
11541163

1164+
/* prettier-ignore */
11551165
.class {
1166+
/* Disabled url handling for the 3 and 6 urls in 'background-image' declaration */
11561167
background-image: image-set(
11571168
url(./url/img.png) 2x,
11581169
url(./url/img.png) 3x,
11591170
/*webpackIgnore: true*/ url(./url/img.png) 4x,
11601171
url(./url/img.png) 5x,
11611172
url(./url/img.png) 6x,
1162-
/*webpackIgnore: true*/ url(./url/img.png) 7x
1173+
/*webpackIgnore: true*/
1174+
url(./url/img.png) 7x
11631175
);
11641176
}
11651177
```

Diff for: src/plugins/postcss-import-parser.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
resolveRequests,
66
isUrlRequestable,
77
requestify,
8-
isWebpackIgnoreSource,
8+
isWebpackIgnoreComment,
99
} from "../utils";
1010

1111
function visitor(result, parsedResults, node, key) {
@@ -14,6 +14,10 @@ function visitor(result, parsedResults, node, key) {
1414
return;
1515
}
1616

17+
if (isWebpackIgnoreComment(node)) {
18+
return;
19+
}
20+
1721
// Nodes do not exists - `@import url('http://') :root {}`
1822
if (node.nodes) {
1923
result.warn(
@@ -97,10 +101,6 @@ const plugin = (options = {}) => {
97101
for (const parsedResult of parsedResults) {
98102
const { node, url, isStringValue, mediaNodes } = parsedResult;
99103

100-
if (isWebpackIgnoreSource(node)) {
101-
return;
102-
}
103-
104104
let normalizedUrl = url;
105105
let prefix = "";
106106

Diff for: src/plugins/postcss-url-parser.js

+18-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
requestify,
66
resolveRequests,
77
isUrlRequestable,
8-
isWebpackIgnoreSource,
9-
webpackIgnoreRegexp,
8+
isWebpackIgnoreComment,
9+
webpackIgnoreCommentRegexp,
1010
} from "../utils";
1111

1212
const isUrlFunc = /url/i;
@@ -37,19 +37,25 @@ function visitor(result, parsedResults, node, key) {
3737
return;
3838
}
3939

40-
if (isWebpackIgnoreSource(node)) {
40+
if (isWebpackIgnoreComment(node)) {
4141
return;
4242
}
4343

4444
const parsed = valueParser(
4545
typeof node.raws.value === "undefined" ? node[key] : node.raws.value.raw
4646
);
4747

48-
let webpackIgnore = false;
48+
let webpackIgnore =
49+
typeof node.raws.between !== "undefined" &&
50+
webpackIgnoreCommentRegexp.test(node.raws.between);
51+
52+
if (webpackIgnore && isImageSetFunc.test(parsed.nodes[0].value)) {
53+
return;
54+
}
4955

5056
parsed.walk((valueNode) => {
5157
if (valueNode.type === "comment") {
52-
if (webpackIgnoreRegexp.test(valueNode.value)) {
58+
if (webpackIgnoreCommentRegexp.test(valueNode.value)) {
5359
webpackIgnore = true;
5460
}
5561
return;
@@ -90,7 +96,7 @@ function visitor(result, parsedResults, node, key) {
9096
const { type, value } = nNode;
9197

9298
if (type === "comment") {
93-
if (webpackIgnoreRegexp.test(value)) {
99+
if (webpackIgnoreCommentRegexp.test(value)) {
94100
imageSetWebpackIgnore = true;
95101
}
96102
// eslint-disable-next-line no-continue
@@ -126,6 +132,12 @@ function visitor(result, parsedResults, node, key) {
126132
});
127133
}
128134
} else if (type === "string") {
135+
if (imageSetWebpackIgnore) {
136+
imageSetWebpackIgnore = false;
137+
// eslint-disable-next-line no-continue
138+
continue;
139+
}
140+
129141
const rule = {
130142
node: nNode,
131143
url: value,
@@ -142,7 +154,6 @@ function visitor(result, parsedResults, node, key) {
142154
}
143155
}
144156
}
145-
146157
// Do not traverse inside `image-set`
147158
// eslint-disable-next-line consistent-return
148159
return false;

Diff for: src/utils.js

+17-26
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const unescapeRegExp = new RegExp(
1919
"ig"
2020
);
2121
const matchNativeWin32Path = /^[A-Z]:[/\\]|^\\\\/i;
22-
const webpackIgnoreRegexp = /webpackIgnore:(\s+)?true/i;
22+
const webpackIgnoreCommentRegexp = /webpackIgnore:(\s+)?true/i;
2323

2424
function unescape(str) {
2525
return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => {
@@ -703,38 +703,29 @@ function sort(a, b) {
703703
return a.index - b.index;
704704
}
705705

706-
function isWebpackIgnoreSource(node) {
707-
if (webpackIgnoreRegexp.test(node.raws.afterName)) {
706+
function isWebpackIgnoreComment(node) {
707+
if (webpackIgnoreCommentRegexp.test(`${node.raws.afterName}`)) {
708708
return true;
709709
}
710710

711-
if (webpackIgnoreRegexp.test(node.raws.between)) {
712-
return true;
713-
}
714-
715-
let rule;
711+
const possibleCommentPlaces = [node.prev()];
716712

717-
// eslint-disable-next-line default-case
718-
switch (node.type) {
719-
case "atrule":
720-
rule = node;
721-
break;
722-
case "decl":
723-
rule = node.parent;
724-
break;
713+
if (node.type === "decl") {
714+
possibleCommentPlaces.push(node.parent.prev());
725715
}
726716

727-
const prevNode = rule.prev();
728-
729-
if (typeof prevNode === "undefined") {
730-
return false;
731-
}
717+
for (const prevNode of possibleCommentPlaces.filter((i) => Boolean(i))) {
718+
if (prevNode.type !== "comment") {
719+
// eslint-disable-next-line no-continue
720+
continue;
721+
}
732722

733-
if (prevNode.type !== "comment") {
734-
return false;
723+
if (webpackIgnoreCommentRegexp.test(prevNode.text)) {
724+
return true;
725+
}
735726
}
736727

737-
return webpackIgnoreRegexp.test(prevNode.text);
728+
return false;
738729
}
739730

740731
export {
@@ -756,6 +747,6 @@ export {
756747
resolveRequests,
757748
isUrlRequestable,
758749
sort,
759-
isWebpackIgnoreSource,
760-
webpackIgnoreRegexp,
750+
isWebpackIgnoreComment,
751+
webpackIgnoreCommentRegexp,
761752
};

Diff for: test/__snapshots__/loader.test.js.snap

+47-23
Original file line numberDiff line numberDiff line change
@@ -730,17 +730,21 @@ exports[`loader should work with webpackIgnore comment: module 1`] = `
730730
import ___CSS_LOADER_API_IMPORT___ from \\"../../src/runtime/api.js\\";
731731
import ___CSS_LOADER_GET_URL_IMPORT___ from \\"../../src/runtime/getUrl.js\\";
732732
import ___CSS_LOADER_URL_IMPORT_0___ from \\"./url/img.png\\";
733-
import ___CSS_LOADER_URL_IMPORT_1___ from \\"./fonts/Roboto-Regular.eot\\";
733+
import ___CSS_LOADER_URL_IMPORT_1___ from \\"./fonts/Roboto-Regular.woff2\\";
734734
import ___CSS_LOADER_URL_IMPORT_2___ from \\"./fonts/Roboto-Regular.woff\\";
735-
import ___CSS_LOADER_URL_IMPORT_3___ from \\"./fonts/Roboto-Regular.svg\\";
735+
import ___CSS_LOADER_URL_IMPORT_3___ from \\"./fonts/Roboto-Regular.ttf\\";
736+
import ___CSS_LOADER_URL_IMPORT_4___ from \\"./fonts/Roboto-Regular.svg\\";
737+
import ___CSS_LOADER_URL_IMPORT_5___ from \\"./fonts/Roboto-Regular.eot\\";
736738
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});
737739
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);
738740
var ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);
739-
var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___, { hash: \\"#iefix\\" });
740-
var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);
741-
var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___, { hash: \\"#Roboto-Regular\\" });
741+
var ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);
742+
var ___CSS_LOADER_URL_REPLACEMENT_3___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_3___);
743+
var ___CSS_LOADER_URL_REPLACEMENT_4___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_4___, { hash: \\"#Roboto-Regular\\" });
744+
var ___CSS_LOADER_URL_REPLACEMENT_5___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___);
745+
var ___CSS_LOADER_URL_REPLACEMENT_6___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_5___, { hash: \\"#iefix\\" });
742746
// Module
743-
___CSS_LOADER_EXPORT___.push([module.id, \\"/*webpackIgnore: true*/\\\\n@import url(./basic.css);\\\\n\\\\n@import /* webpackIgnore: true */ url(./imported.css);\\\\n\\\\n/** webpackIgnore: true **/\\\\n@import url(./simple.css);\\\\n\\\\n/** webpackIgnore: true */\\\\n.class {\\\\n color: red;\\\\n background: url(\\\\\\"./url/img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n color: red;\\\\n background: /** webpackIgnore: true */ url(\\\\\\"./url/img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background:\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n /** webpackIgnore: true **/ url(\\\\\\"./url/img.png\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n /** webpackIgnore: true **/ url(\\\\\\"./url/img.png\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./url/img.png\\\\\\");\\\\n}\\\\n\\\\n/** webpackIgnore: true **/\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: url(\\\\\\"./fonts/Roboto-Regular.eot\\\\\\");\\\\n src:\\\\n url(\\\\\\"./fonts/Roboto-Regular.eot#iefix\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff2\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.ttf\\\\\\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.svg#Roboto-Regular\\\\\\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: /** webpackIgnore: true **/ url(\\\\\\"./fonts/Roboto-Regular.eot\\\\\\");\\\\n src: /** webpackIgnore: true **/\\\\n url(\\\\\\"./fonts/Roboto-Regular.eot#iefix\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff2\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.ttf\\\\\\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.svg#Roboto-Regular\\\\\\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \\");\\\\n src:\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff2\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \\") format(\\\\\\"woff\\\\\\"),\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./fonts/Roboto-Regular.ttf\\\\\\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n/*webpackIgnore: true*/\\\\n.class {\\\\n background-image: image-set(\\\\n url(./url/img.png) 2x,\\\\n url(./url/img.png) 3x,\\\\n url(./url/img.png) 4x,\\\\n url(./url/img.png) 5x,\\\\n url(./url/img.png) 6x,\\\\n url(./url/img.png) 7x\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background-image: /*webpackIgnore: true*/ image-set(\\\\n url(./url/img.png) 2x,\\\\n url(./url/img.png) 3x,\\\\n url(./url/img.png) 4x,\\\\n url(./url/img.png) 5x,\\\\n url(./url/img.png) 6x,\\\\n url(./url/img.png) 7x\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background-image: image-set(\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") 3x,\\\\n /*webpackIgnore: true*/\\\\n url(./url/img.png) 4x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") 5x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") 6x,\\\\n /*webpackIgnore: true*/\\\\n url(./url/img.png) 7x\\\\n );\\\\n}\\\\n\\\\n\\", \\"\\"]);
747+
___CSS_LOADER_EXPORT___.push([module.id, \\"/*webpackIgnore: true*/\\\\n@import url(./basic.css);\\\\n\\\\n@import /* webpackIgnore: true */ url(./imported.css);\\\\n\\\\n/** webpackIgnore: true **/\\\\n@import url(./simple.css);\\\\n\\\\n/** webpackIgnore: true */\\\\n.class {\\\\n color: red;\\\\n background: url(\\\\\\"./url/img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n color: red;\\\\n background: /** webpackIgnore: true */ url(\\\\\\"./url/img.png\\\\\\"), url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n color: red;\\\\n /** webpackIgnore: true */\\\\n background: url(\\\\\\"./url/img.png\\\\\\"), url(\\\\\\"./url/img.png\\\\\\");\\\\n}\\\\n\\\\n.class {\\\\n background:\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n /** webpackIgnore: true **/ url(\\\\\\"./url/img.png\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n /** webpackIgnore: true **/ url(\\\\\\"./url/img.png\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\"),\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./url/img.png\\\\\\");\\\\n}\\\\n\\\\n/** webpackIgnore: true **/\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: url(\\\\\\"./fonts/Roboto-Regular.eot\\\\\\");\\\\n src:\\\\n url(\\\\\\"./fonts/Roboto-Regular.eot#iefix\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff2\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.ttf\\\\\\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.svg#Roboto-Regular\\\\\\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: /** webpackIgnore: true **/ url(\\\\\\"./fonts/Roboto-Regular.eot\\\\\\");\\\\n src:\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./fonts/Roboto-Regular.eot#iefix\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_1___ + \\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_3___ + \\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: /** webpackIgnore: true **/ url(\\\\\\"./fonts/Roboto-Regular.eot\\\\\\");\\\\n /** webpackIgnore: true **/\\\\n src:\\\\n url(\\\\\\"./fonts/Roboto-Regular.eot#iefix\\\\\\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff2\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.ttf\\\\\\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\\\\\"./fonts/Roboto-Regular.svg#Roboto-Regular\\\\\\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n@font-face {\\\\n font-family: \\\\\\"Roboto\\\\\\";\\\\n src: url(\\" + ___CSS_LOADER_URL_REPLACEMENT_5___ + \\");\\\\n src:\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_6___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./fonts/Roboto-Regular.woff2\\\\\\") format(\\\\\\"woff\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_2___ + \\") format(\\\\\\"woff\\\\\\"),\\\\n /** webpackIgnore: true **/\\\\n url(\\\\\\"./fonts/Roboto-Regular.ttf\\\\\\") format(\\\\\\"truetype\\\\\\"),\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_4___ + \\") format(\\\\\\"svg\\\\\\");\\\\n font-weight: 400;\\\\n font-style: normal;\\\\n}\\\\n\\\\n/*webpackIgnore: true*/\\\\n.class {\\\\n background-image: image-set(\\\\n url(./url/img.png) 2x,\\\\n url(./url/img.png) 3x,\\\\n url(./url/img.png) 4x\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n /*webpackIgnore: true*/\\\\n background-image: image-set(\\\\n url(./url/img.png) 2x,\\\\n url(./url/img.png) 3x,\\\\n url(./url/img.png) 4x\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background-image: /*webpackIgnore: true*/ image-set(\\\\n url(./url/img.png) 2x,\\\\n url(./url/img.png) 3x,\\\\n url(./url/img.png) 4x\\\\n );\\\\n}\\\\n\\\\n.class {\\\\n background-image: image-set(\\\\n /*webpackIgnore: true*/\\\\n url(./url/img.png) 2x,\\\\n url(\\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \\") 3x,\\\\n /*webpackIgnore: true*/\\\\n url(./url/img.png) 5x\\\\n );\\\\n}\\\\n\\", \\"\\"]);
744748
// Exports
745749
export default ___CSS_LOADER_EXPORT___;
746750
"
@@ -766,7 +770,13 @@ Array [
766770
767771
.class {
768772
color: red;
769-
background: /** webpackIgnore: true */ url(\\"./url/img.png\\");
773+
background: /** webpackIgnore: true */ url(\\"./url/img.png\\"), url(/webpack/public/path/img.png);
774+
}
775+
776+
.class {
777+
color: red;
778+
/** webpackIgnore: true */
779+
background: url(\\"./url/img.png\\"), url(\\"./url/img.png\\");
770780
}
771781
772782
.class {
@@ -800,7 +810,22 @@ Array [
800810
@font-face {
801811
font-family: \\"Roboto\\";
802812
src: /** webpackIgnore: true **/ url(\\"./fonts/Roboto-Regular.eot\\");
803-
src: /** webpackIgnore: true **/
813+
src:
814+
/** webpackIgnore: true **/
815+
url(\\"./fonts/Roboto-Regular.eot#iefix\\") format(\\"embedded-opentype\\"),
816+
url(/webpack/public/path/Roboto-Regular.woff2) format(\\"woff\\"),
817+
url(/webpack/public/path/Roboto-Regular.woff) format(\\"woff\\"),
818+
url(/webpack/public/path/Roboto-Regular.ttf) format(\\"truetype\\"),
819+
url(/webpack/public/path/Roboto-Regular.svg#Roboto-Regular) format(\\"svg\\");
820+
font-weight: 400;
821+
font-style: normal;
822+
}
823+
824+
@font-face {
825+
font-family: \\"Roboto\\";
826+
src: /** webpackIgnore: true **/ url(\\"./fonts/Roboto-Regular.eot\\");
827+
/** webpackIgnore: true **/
828+
src:
804829
url(\\"./fonts/Roboto-Regular.eot#iefix\\") format(\\"embedded-opentype\\"),
805830
url(\\"./fonts/Roboto-Regular.woff2\\") format(\\"woff\\"),
806831
url(\\"./fonts/Roboto-Regular.woff\\") format(\\"woff\\"),
@@ -830,37 +855,36 @@ Array [
830855
background-image: image-set(
831856
url(./url/img.png) 2x,
832857
url(./url/img.png) 3x,
833-
url(./url/img.png) 4x,
834-
url(./url/img.png) 5x,
835-
url(./url/img.png) 6x,
836-
url(./url/img.png) 7x
858+
url(./url/img.png) 4x
859+
);
860+
}
861+
862+
.class {
863+
/*webpackIgnore: true*/
864+
background-image: image-set(
865+
url(./url/img.png) 2x,
866+
url(./url/img.png) 3x,
867+
url(./url/img.png) 4x
837868
);
838869
}
839870
840871
.class {
841872
background-image: /*webpackIgnore: true*/ image-set(
842873
url(./url/img.png) 2x,
843874
url(./url/img.png) 3x,
844-
url(./url/img.png) 4x,
845-
url(./url/img.png) 5x,
846-
url(./url/img.png) 6x,
847-
url(./url/img.png) 7x
875+
url(./url/img.png) 4x
848876
);
849877
}
850878
851879
.class {
852880
background-image: image-set(
853-
url(/webpack/public/path/img.png) 2x,
881+
/*webpackIgnore: true*/
882+
url(./url/img.png) 2x,
854883
url(/webpack/public/path/img.png) 3x,
855884
/*webpackIgnore: true*/
856-
url(./url/img.png) 4x,
857-
url(/webpack/public/path/img.png) 5x,
858-
url(/webpack/public/path/img.png) 6x,
859-
/*webpackIgnore: true*/
860-
url(./url/img.png) 7x
885+
url(./url/img.png) 5x
861886
);
862887
}
863-
864888
",
865889
"",
866890
],

0 commit comments

Comments
 (0)