Repository: webpack-contrib/css-loader
Pull request #1001 (2019-12-02 13:02:27)

fix: compatibility with ES modules syntax and hash in `url` function
<!--
  HOLY CRAP a Pull Request. We ❤️ those!

  If you remove or skip this template, you'll make the 🐼 sad and the mighty god
  of Github will appear and pile-drive the close button from a great height
  while making animal noises.

  Please place an x (no spaces!) in all [ ] that apply
-->

This PR contains a:

- [x] **bugfix**
- [ ] new **feature**
- [ ] **code refactor**
- [x] **test update** <!-- if bug or feature is checked, this should be too -->
- [ ] **typo fix**
- [ ] **metadata update**

### Motivation / Use-Case

https://github.com/webpack-contrib/mini-css-extract-plugin/issues/469

### Breaking Changes

No

### Additional Info

No

codecov[bot]: # [Codecov](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=h1) Report
> Merging [#1001](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=desc) into [master](https://codecov.io/gh/webpack-contrib/css-loader/commit/e21ab0073c1c37771996ac78bd3d7dc678affddb?src=pr&el=desc) will **increase** coverage by `0.03%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001/graphs/tree.svg?width=650&token=DlN3OQ0JnO&height=150&src=pr)](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1001      +/-   ##
==========================================
+ Coverage   98.35%   98.38%   +0.03%     
==========================================
  Files          10       10              
  Lines         425      434       +9     
  Branches      126      131       +5     
==========================================
+ Hits          418      427       +9     
  Misses          7        7
```


| [Impacted Files](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/utils.js](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001/diff?src=pr&el=tree#diff-c3JjL3V0aWxzLmpz) | `99.37% <100%> (+0.01%)` | :arrow_up: |
| [src/runtime/getUrl.js](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001/diff?src=pr&el=tree#diff-c3JjL3J1bnRpbWUvZ2V0VXJsLmpz) | `100% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=footer). Last update [e21ab00...722bb28](https://codecov.io/gh/webpack-contrib/css-loader/pull/1001?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/src/runtime/getUrl.js b/src/runtime/getUrl.js
index 9b8b136..c2e3d50 100644
--- a/src/runtime/getUrl.js
+++ b/src/runtime/getUrl.js
@@ -1,4 +1,9 @@
-module.exports = (url, needQuotes) => {
+module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -12,9 +17,14 @@ module.exports = (url, needQuotes) => {
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/["'() \t\n]/.test(url) || needQuotes) {
+  if (/["'() \t\n]/.test(url) || options.needQuotes) {
     return `"${url.replace(/"/g, '\\"').replace(/\n/g, '\\n')}"`;
   }
 
diff --git a/src/utils.js b/src/utils.js
index 6cb0572..26140ed 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -242,10 +242,23 @@ function getUrlItemCode(item, loaderContext) {
       ? `"${singleQuery ? '?' : ''}${hashValue ? `#${hashValue}` : ''}"`
       : '';
 
+  const options = [];
+
+  if (hash) {
+    options.push(`hash: ${hash}`);
+  }
+
+  if (needQuotes) {
+    options.push(`needQuotes: true`);
+  }
+
+  const preparedOptions =
+    options.length > 0 ? `, { ${options.join(', ')} }` : '';
+
   return `var ${placeholder} = getUrl(require(${stringifyRequest(
     loaderContext,
     urlToRequest(normalizedUrl)
-  )})${hash ? ` + ${hash}` : ''}${needQuotes ? ', true' : ''});`;
+  )})${preparedOptions});`;
 }
 
 function getApiCode(loaderContext, sourceMap, onlyLocals) {


Test patch:
diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap
index 68f488c..43e9410 100644
--- a/test/__snapshots__/loader.test.js.snap
+++ b/test/__snapshots__/loader.test.js.snap
@@ -102,7 +102,12 @@ function toComment(sourceMap) {
 exports[`loader should compile with \`css\` entry point (with \`modules\` and scope \`global\`): errors 1`] = `Array []`;
 
 exports[`loader should compile with \`css\` entry point (with \`modules\` and scope \`global\`): escape 1`] = `
-"module.exports = (url, needQuotes) => {
+"module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -116,9 +121,14 @@ exports[`loader should compile with \`css\` entry point (with \`modules\` and sc
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/[\\"'() \\\\t\\\\n]/.test(url) || needQuotes) {
+  if (/[\\"'() \\\\t\\\\n]/.test(url) || options.needQuotes) {
     return \`\\"\${url.replace(/\\"/g, '\\\\\\\\\\"').replace(/\\\\n/g, '\\\\\\\\n')}\\"\`;
   }
 
@@ -395,7 +405,12 @@ function toComment(sourceMap) {
 exports[`loader should compile with \`css\` entry point (with \`modules\` and scope \`local\`): errors 1`] = `Array []`;
 
 exports[`loader should compile with \`css\` entry point (with \`modules\` and scope \`local\`): escape 1`] = `
-"module.exports = (url, needQuotes) => {
+"module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -409,9 +424,14 @@ exports[`loader should compile with \`css\` entry point (with \`modules\` and sc
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/[\\"'() \\\\t\\\\n]/.test(url) || needQuotes) {
+  if (/[\\"'() \\\\t\\\\n]/.test(url) || options.needQuotes) {
     return \`\\"\${url.replace(/\\"/g, '\\\\\\\\\\"').replace(/\\\\n/g, '\\\\\\\\n')}\\"\`;
   }
 
@@ -712,7 +732,12 @@ function toComment(sourceMap) {
 exports[`loader should compile with \`css\` entry point: errors 1`] = `Array []`;
 
 exports[`loader should compile with \`css\` entry point: escape 1`] = `
-"module.exports = (url, needQuotes) => {
+"module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -726,9 +751,14 @@ exports[`loader should compile with \`css\` entry point: escape 1`] = `
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/[\\"'() \\\\t\\\\n]/.test(url) || needQuotes) {
+  if (/[\\"'() \\\\t\\\\n]/.test(url) || options.needQuotes) {
     return \`\\"\${url.replace(/\\"/g, '\\\\\\\\\\"').replace(/\\\\n/g, '\\\\\\\\n')}\\"\`;
   }
 
@@ -1005,7 +1035,12 @@ function toComment(sourceMap) {
 exports[`loader should compile with \`js\` entry point: errors 1`] = `Array []`;
 
 exports[`loader should compile with \`js\` entry point: escape 1`] = `
-"module.exports = (url, needQuotes) => {
+"module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -1019,9 +1054,14 @@ exports[`loader should compile with \`js\` entry point: escape 1`] = `
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/[\\"'() \\\\t\\\\n]/.test(url) || needQuotes) {
+  if (/[\\"'() \\\\t\\\\n]/.test(url) || options.needQuotes) {
     return \`\\"\${url.replace(/\\"/g, '\\\\\\\\\\"').replace(/\\\\n/g, '\\\\\\\\n')}\\"\`;
   }
 
@@ -1490,7 +1530,12 @@ exports.push([module.i, \\".foo {\\\\n  color: red;\\\\n}\\\\n\\", \\"\\"]);
 /* 4 */
 /***/ (function(module, exports) {
 
-module.exports = (url, needQuotes) => {
+module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -1504,9 +1549,14 @@ module.exports = (url, needQuotes) => {
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/[\\"'() \\\\t\\\\n]/.test(url) || needQuotes) {
+  if (/[\\"'() \\\\t\\\\n]/.test(url) || options.needQuotes) {
     return \`\\"\${url.replace(/\\"/g, '\\\\\\\\\\"').replace(/\\\\n/g, '\\\\\\\\n')}\\"\`;
   }
 
@@ -1755,7 +1805,12 @@ exports.push([module.i, \\".foo {\\\\n  color: red;\\\\n}\\\\n\\", \\"\\"]);
 /* 4 */
 /***/ (function(module, exports) {
 
-module.exports = (url, needQuotes) => {
+module.exports = (url, options) => {
+  if (!options) {
+    // eslint-disable-next-line no-param-reassign
+    options = {};
+  }
+
   // eslint-disable-next-line no-underscore-dangle, no-param-reassign
   url = url.__esModule ? url.default : url;
 
@@ -1769,9 +1824,14 @@ module.exports = (url, needQuotes) => {
     url = url.slice(1, -1);
   }
 
+  if (options.hash) {
+    // eslint-disable-next-line no-param-reassign
+    url += options.hash;
+  }
+
   // Should url be wrapped?
   // See https://drafts.csswg.org/css-values-3/#urls
-  if (/[\\"'() \\\\t\\\\n]/.test(url) || needQuotes) {
+  if (/[\\"'() \\\\t\\\\n]/.test(url) || options.needQuotes) {
     return \`\\"\${url.replace(/\\"/g, '\\\\\\\\\\"').replace(/\\\\n/g, '\\\\\\\\n')}\\"\`;
   }
 
diff --git a/test/__snapshots__/url-option.test.js.snap b/test/__snapshots__/url-option.test.js.snap
index 590afdb..4767f15 100644
--- a/test/__snapshots__/url-option.test.js.snap
+++ b/test/__snapshots__/url-option.test.js.snap
@@ -298,20 +298,20 @@ var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./font.woff2\\"));
 var ___CSS_LOADER_URL___2___ = getUrl(require(\\"./font.eot\\"));
 var ___CSS_LOADER_URL___3___ = getUrl(require(\\"package/font.ttf\\"));
 var ___CSS_LOADER_URL___4___ = getUrl(require(\\"./font with spaces.eot\\"));
-var ___CSS_LOADER_URL___5___ = getUrl(require(\\"./font.svg\\") + \\"#svgFontName\\");
+var ___CSS_LOADER_URL___5___ = getUrl(require(\\"./font.svg\\"), { hash: \\"#svgFontName\\" });
 var ___CSS_LOADER_URL___6___ = getUrl(require(\\"./font.woff2?foo=bar\\"));
-var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\") + \\"?#iefix\\");
-var ___CSS_LOADER_URL___8___ = getUrl(require(\\"./font with spaces.eot\\") + \\"?#iefix\\");
+var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\"), { hash: \\"?#iefix\\" });
+var ___CSS_LOADER_URL___8___ = getUrl(require(\\"./font with spaces.eot\\"), { hash: \\"?#iefix\\" });
 var ___CSS_LOADER_URL___9___ = getUrl(require(\\"./img1x.png\\"));
 var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./img2x.png\\"));
 var ___CSS_LOADER_URL___11___ = getUrl(require(\\"./img-simple.png\\"));
 var ___CSS_LOADER_URL___12___ = getUrl(require(\\"../url/img-simple.png\\"));
-var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./img1x.png\\"), true);
-var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img2x.png\\"), true);
-var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img3x.png\\"), true);
-var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img1x.png?foo=bar\\"), true);
-var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img1x.png\\") + \\"#hash\\", true);
-var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img1x.png\\") + \\"?#iefix\\", true);
+var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./img1x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img2x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img3x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img1x.png?foo=bar\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"#hash\\", needQuotes: true });
+var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"?#iefix\\", needQuotes: true });
 var ___CSS_LOADER_URL___19___ = getUrl(require(\\"./img3x.png\\"));
 // 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,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\");\\\\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,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"><filter id=\\\\\\"filter\\\\\\"><feGaussianBlur in=\\\\\\"SourceAlpha\\\\\\" stdDeviation=\\\\\\"0\\\\\\" /><feOffset dx=\\\\\\"1\\\\\\" dy=\\\\\\"2\\\\\\" result=\\\\\\"offsetblur\\\\\\" /><feFlood flood-color=\\\\\\"rgba(255,255,255,1)\\\\\\" /><feComposite in2=\\\\\\"offsetblur\\\\\\" operator=\\\\\\"in\\\\\\" /><feMerge><feMergeNode /><feMergeNode in=\\\\\\"SourceGraphic\\\\\\" /></feMerge></filter></svg>#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___0___ + \\") format('woff'),\\\\n    url(\\" + ___CSS_LOADER_URL___1___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___2___ + \\") format('eot'),\\\\n    url(\\" + ___CSS_LOADER_URL___3___ + \\") format('truetype'),\\\\n    url(\\" + ___CSS_LOADER_URL___4___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n    url(\\" + ___CSS_LOADER_URL___5___ + \\") format('svg'),\\\\n    url(\\" + ___CSS_LOADER_URL___6___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___7___ + \\") format('embedded-opentype'),\\\\n    url(\\" + ___CSS_LOADER_URL___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___9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___10___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___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,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\") 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___11___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n  background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n  background: url(\\" + ___CSS_LOADER_URL___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___13___ + \\" 1x, \\" + ___CSS_LOADER_URL___14___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___13___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___13___ + \\" 1x, \\" + ___CSS_LOADER_URL___14___ + \\" 2x);\\\\n  background-image: image-set(\\\\\\"./img img.png\\\\\\" 1x, \\\\\\"./img img.png\\\\\\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___13___ + \\" 1x, \\" + ___CSS_LOADER_URL___14___ + \\" 2x),\\\\n    image-set(\\" + ___CSS_LOADER_URL___13___ + \\" 1x, \\" + ___CSS_LOADER_URL___14___ + \\" 2x);\\\\n  background-image: image-set(\\\\n    \\" + ___CSS_LOADER_URL___13___ + \\" 1x,\\\\n    \\" + ___CSS_LOADER_URL___14___ + \\" 2x,\\\\n    \\" + ___CSS_LOADER_URL___15___ + \\" 600dpi\\\\n  );\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___16___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___17___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___18___ + \\" 1x);\\\\n\\\\n  /* With \`url\` function */\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___10___ + \\") 2x);\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x);\\\\n  background-image: -webkit-image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___10___ + \\") 2x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") 1x,\\\\n    url(\\" + ___CSS_LOADER_URL___10___ + \\") 2x,\\\\n    url(\\" + ___CSS_LOADER_URL___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___9___ + \\") 1x, \\" + ___CSS_LOADER_URL___14___ + \\" 2x);\\\\n}\\\\n\\", \\"\\"]);
@@ -979,7 +979,7 @@ exports[`url option true and modules \`false\`: module 1`] = `
 exports.i(require(\\"-!../../../src/index.js??ref--4-0!./imported.css\\"), \\"\\");
 var getUrl = require(\\"../../../src/runtime/getUrl.js\\");
 var ___CSS_LOADER_URL___0___ = getUrl(require(\\"./img.png\\"));
-var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___2___ = getUrl(require(\\"package/img.png\\"));
 var ___CSS_LOADER_URL___3___ = getUrl(require(\\"./other-img.png\\"));
 var ___CSS_LOADER_URL___4___ = getUrl(require(\\"./img img.png\\"));
@@ -988,28 +988,28 @@ var ___CSS_LOADER_URL___6___ = getUrl(require(\\"./font.woff2\\"));
 var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\"));
 var ___CSS_LOADER_URL___8___ = getUrl(require(\\"package/font.ttf\\"));
 var ___CSS_LOADER_URL___9___ = getUrl(require(\\"./font with spaces.eot\\"));
-var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\") + \\"#svgFontName\\");
+var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\"), { hash: \\"#svgFontName\\" });
 var ___CSS_LOADER_URL___11___ = getUrl(require(\\"./font.woff2?foo=bar\\"));
-var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\") + \\"?#iefix\\");
-var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\") + \\"?#iefix\\");
+var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\"), { hash: \\"?#iefix\\" });
+var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\"), { hash: \\"?#iefix\\" });
 var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img1x.png\\"));
 var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img2x.png\\"));
 var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img.png?foo\\"));
 var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img.png?foo=bar\\"));
-var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___19___ = getUrl(require(\\"./img.png?\\"));
 var ___CSS_LOADER_URL___20___ = getUrl(require(\\"./img-simple.png\\"));
 var ___CSS_LOADER_URL___21___ = getUrl(require(\\"../url/img-simple.png\\"));
 var ___CSS_LOADER_URL___22___ = getUrl(require(\\"aliasesImg/img.png\\"));
 var ___CSS_LOADER_URL___23___ = getUrl(require(\\"./nested/img.png\\"));
 var ___CSS_LOADER_URL___24___ = getUrl(require(\\"./nested/img.png\\"));
-var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), true);
-var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), true);
-var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), true);
-var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), true);
-var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), true);
-var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\") + \\"#hash\\", true);
-var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\") + \\"?#iefix\\", true);
+var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"#hash\\", needQuotes: true });
+var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"?#iefix\\", needQuotes: true });
 var ___CSS_LOADER_URL___32___ = getUrl(require(\\"./img3x.png\\"));
 // Module
 exports.push([module.id, \\".class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___1___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\\\n    \\" + ___CSS_LOADER_URL___0___ + \\"\\\\n  );\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___2___ + \\") url(\\" + ___CSS_LOADER_URL___3___ + \\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___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,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\");\\\\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,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"><filter id=\\\\\\"filter\\\\\\"><feGaussianBlur in=\\\\\\"SourceAlpha\\\\\\" stdDeviation=\\\\\\"0\\\\\\" /><feOffset dx=\\\\\\"1\\\\\\" dy=\\\\\\"2\\\\\\" result=\\\\\\"offsetblur\\\\\\" /><feFlood flood-color=\\\\\\"rgba(255,255,255,1)\\\\\\" /><feComposite in2=\\\\\\"offsetblur\\\\\\" operator=\\\\\\"in\\\\\\" /><feMerge><feMergeNode /><feMergeNode in=\\\\\\"SourceGraphic\\\\\\" /></feMerge></filter></svg>#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___5___ + \\") format('woff'),\\\\n    url(\\" + ___CSS_LOADER_URL___6___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___7___ + \\") format('eot'),\\\\n    url(\\" + ___CSS_LOADER_URL___8___ + \\") format('truetype'),\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n    url(\\" + ___CSS_LOADER_URL___10___ + \\") format('svg'),\\\\n    url(\\" + ___CSS_LOADER_URL___11___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___12___ + \\") format('embedded-opentype'),\\\\n    url(\\" + ___CSS_LOADER_URL___13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n  body {\\\\n    background: url(\\" + ___CSS_LOADER_URL___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___0___ + \\") xyz;\\\\n}\\\\n\\\\n.a {\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___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___16___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___17___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___19___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background-image: url(\\" + ___CSS_LOADER_URL___0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\") url(\\" + ___CSS_LOADER_URL___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___20___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n  background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n  background: url(\\" + ___CSS_LOADER_URL___21___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n  background: url(\\" + ___CSS_LOADER_URL___2___ + \\");\\\\n}\\\\n\\\\n.aliases {\\\\n  background: url(\\" + ___CSS_LOADER_URL___22___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___23___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___24___ + \\");\\\\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___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___27___ + \\" 1x, \\" + ___CSS_LOADER_URL___27___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x),\\\\n    image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\\\n    \\" + ___CSS_LOADER_URL___25___ + \\" 1x,\\\\n    \\" + ___CSS_LOADER_URL___26___ + \\" 2x,\\\\n    \\" + ___CSS_LOADER_URL___28___ + \\" 600dpi\\\\n  );\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___29___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___30___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___31___ + \\" 1x);\\\\n\\\\n  /* With \`url\` function */\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: -webkit-image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x,\\\\n    url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x,\\\\n    url(\\" + ___CSS_LOADER_URL___32___ + \\") 600dpi\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___4___ + \\") 2x);\\\\n\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n}\\\\n\\", \\"\\"]);
@@ -1378,7 +1378,7 @@ exports[`url option true and modules \`global\`: module 1`] = `
 exports.i(require(\\"-!../../../src/index.js??ref--4-0!./imported.css\\"), \\"\\");
 var getUrl = require(\\"../../../src/runtime/getUrl.js\\");
 var ___CSS_LOADER_URL___0___ = getUrl(require(\\"./img.png\\"));
-var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___2___ = getUrl(require(\\"package/img.png\\"));
 var ___CSS_LOADER_URL___3___ = getUrl(require(\\"./other-img.png\\"));
 var ___CSS_LOADER_URL___4___ = getUrl(require(\\"./img img.png\\"));
@@ -1387,28 +1387,28 @@ var ___CSS_LOADER_URL___6___ = getUrl(require(\\"./font.woff2\\"));
 var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\"));
 var ___CSS_LOADER_URL___8___ = getUrl(require(\\"package/font.ttf\\"));
 var ___CSS_LOADER_URL___9___ = getUrl(require(\\"./font with spaces.eot\\"));
-var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\") + \\"#svgFontName\\");
+var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\"), { hash: \\"#svgFontName\\" });
 var ___CSS_LOADER_URL___11___ = getUrl(require(\\"./font.woff2?foo=bar\\"));
-var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\") + \\"?#iefix\\");
-var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\") + \\"?#iefix\\");
+var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\"), { hash: \\"?#iefix\\" });
+var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\"), { hash: \\"?#iefix\\" });
 var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img1x.png\\"));
 var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img2x.png\\"));
 var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img.png?foo\\"));
 var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img.png?foo=bar\\"));
-var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___19___ = getUrl(require(\\"./img.png?\\"));
 var ___CSS_LOADER_URL___20___ = getUrl(require(\\"./img-simple.png\\"));
 var ___CSS_LOADER_URL___21___ = getUrl(require(\\"../url/img-simple.png\\"));
 var ___CSS_LOADER_URL___22___ = getUrl(require(\\"aliasesImg/img.png\\"));
 var ___CSS_LOADER_URL___23___ = getUrl(require(\\"./nested/img.png\\"));
 var ___CSS_LOADER_URL___24___ = getUrl(require(\\"./nested/img.png\\"));
-var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), true);
-var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), true);
-var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), true);
-var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), true);
-var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), true);
-var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\") + \\"#hash\\", true);
-var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\") + \\"?#iefix\\", true);
+var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"#hash\\", needQuotes: true });
+var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"?#iefix\\", needQuotes: true });
 var ___CSS_LOADER_URL___32___ = getUrl(require(\\"./img3x.png\\"));
 // Module
 exports.push([module.id, \\".class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___1___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\\\n    \\" + ___CSS_LOADER_URL___0___ + \\"\\\\n  );\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___2___ + \\") url(\\" + ___CSS_LOADER_URL___3___ + \\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___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,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\");\\\\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,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"><filter id=\\\\\\"filter\\\\\\"><feGaussianBlur in=\\\\\\"SourceAlpha\\\\\\" stdDeviation=\\\\\\"0\\\\\\" /><feOffset dx=\\\\\\"1\\\\\\" dy=\\\\\\"2\\\\\\" result=\\\\\\"offsetblur\\\\\\" /><feFlood flood-color=\\\\\\"rgba(255,255,255,1)\\\\\\" /><feComposite in2=\\\\\\"offsetblur\\\\\\" operator=\\\\\\"in\\\\\\" /><feMerge><feMergeNode /><feMergeNode in=\\\\\\"SourceGraphic\\\\\\" /></feMerge></filter></svg>#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___5___ + \\") format('woff'),\\\\n    url(\\" + ___CSS_LOADER_URL___6___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___7___ + \\") format('eot'),\\\\n    url(\\" + ___CSS_LOADER_URL___8___ + \\") format('truetype'),\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n    url(\\" + ___CSS_LOADER_URL___10___ + \\") format('svg'),\\\\n    url(\\" + ___CSS_LOADER_URL___11___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___12___ + \\") format('embedded-opentype'),\\\\n    url(\\" + ___CSS_LOADER_URL___13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n  body {\\\\n    background: url(\\" + ___CSS_LOADER_URL___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___0___ + \\") xyz;\\\\n}\\\\n\\\\n.a {\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___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___16___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___17___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___19___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background-image: url(\\" + ___CSS_LOADER_URL___0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\") url(\\" + ___CSS_LOADER_URL___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___20___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n  background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n  background: url(\\" + ___CSS_LOADER_URL___21___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n  background: url(\\" + ___CSS_LOADER_URL___2___ + \\");\\\\n}\\\\n\\\\n.aliases {\\\\n  background: url(\\" + ___CSS_LOADER_URL___22___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___23___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___24___ + \\");\\\\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___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___27___ + \\" 1x, \\" + ___CSS_LOADER_URL___27___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x),\\\\n    image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\\\n    \\" + ___CSS_LOADER_URL___25___ + \\" 1x,\\\\n    \\" + ___CSS_LOADER_URL___26___ + \\" 2x,\\\\n    \\" + ___CSS_LOADER_URL___28___ + \\" 600dpi\\\\n  );\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___29___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___30___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___31___ + \\" 1x);\\\\n\\\\n  /* With \`url\` function */\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: -webkit-image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x,\\\\n    url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x,\\\\n    url(\\" + ___CSS_LOADER_URL___32___ + \\") 600dpi\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___4___ + \\") 2x);\\\\n\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n}\\\\n\\", \\"\\"]);
@@ -1777,7 +1777,7 @@ exports[`url option true and modules \`local\`: module 1`] = `
 exports.i(require(\\"-!../../../src/index.js??ref--4-0!./imported.css\\"), \\"\\");
 var getUrl = require(\\"../../../src/runtime/getUrl.js\\");
 var ___CSS_LOADER_URL___0___ = getUrl(require(\\"./img.png\\"));
-var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___2___ = getUrl(require(\\"package/img.png\\"));
 var ___CSS_LOADER_URL___3___ = getUrl(require(\\"./other-img.png\\"));
 var ___CSS_LOADER_URL___4___ = getUrl(require(\\"./img img.png\\"));
@@ -1786,28 +1786,28 @@ var ___CSS_LOADER_URL___6___ = getUrl(require(\\"./font.woff2\\"));
 var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\"));
 var ___CSS_LOADER_URL___8___ = getUrl(require(\\"package/font.ttf\\"));
 var ___CSS_LOADER_URL___9___ = getUrl(require(\\"./font with spaces.eot\\"));
-var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\") + \\"#svgFontName\\");
+var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\"), { hash: \\"#svgFontName\\" });
 var ___CSS_LOADER_URL___11___ = getUrl(require(\\"./font.woff2?foo=bar\\"));
-var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\") + \\"?#iefix\\");
-var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\") + \\"?#iefix\\");
+var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\"), { hash: \\"?#iefix\\" });
+var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\"), { hash: \\"?#iefix\\" });
 var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img1x.png\\"));
 var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img2x.png\\"));
 var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img.png?foo\\"));
 var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img.png?foo=bar\\"));
-var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___19___ = getUrl(require(\\"./img.png?\\"));
 var ___CSS_LOADER_URL___20___ = getUrl(require(\\"./img-simple.png\\"));
 var ___CSS_LOADER_URL___21___ = getUrl(require(\\"../url/img-simple.png\\"));
 var ___CSS_LOADER_URL___22___ = getUrl(require(\\"aliasesImg/img.png\\"));
 var ___CSS_LOADER_URL___23___ = getUrl(require(\\"./nested/img.png\\"));
 var ___CSS_LOADER_URL___24___ = getUrl(require(\\"./nested/img.png\\"));
-var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), true);
-var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), true);
-var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), true);
-var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), true);
-var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), true);
-var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\") + \\"#hash\\", true);
-var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\") + \\"?#iefix\\", true);
+var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"#hash\\", needQuotes: true });
+var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"?#iefix\\", needQuotes: true });
 var ___CSS_LOADER_URL___32___ = getUrl(require(\\"./img3x.png\\"));
 // Module
 exports.push([module.id, \\"._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___1___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\\\n    \\" + ___CSS_LOADER_URL___0___ + \\"\\\\n  );\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___2___ + \\") url(\\" + ___CSS_LOADER_URL___3___ + \\") xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"><filter id=\\\\\\"filter\\\\\\"><feGaussianBlur in=\\\\\\"SourceAlpha\\\\\\" stdDeviation=\\\\\\"0\\\\\\" /><feOffset dx=\\\\\\"1\\\\\\" dy=\\\\\\"2\\\\\\" result=\\\\\\"offsetblur\\\\\\" /><feFlood flood-color=\\\\\\"rgba(255,255,255,1)\\\\\\" /><feComposite in2=\\\\\\"offsetblur\\\\\\" operator=\\\\\\"in\\\\\\" /><feMerge><feMergeNode /><feMergeNode in=\\\\\\"SourceGraphic\\\\\\" /></feMerge></filter></svg>#filter');\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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.lml_5t-nQdGlKc9OtKjUO {\\\\n  filter: url(#highlight);\\\\n}\\\\n\\\\n.lml_5t-nQdGlKc9OtKjUO {\\\\n  filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n  src: url(\\" + ___CSS_LOADER_URL___5___ + \\") format('woff'),\\\\n    url(\\" + ___CSS_LOADER_URL___6___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___7___ + \\") format('eot'),\\\\n    url(\\" + ___CSS_LOADER_URL___8___ + \\") format('truetype'),\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n    url(\\" + ___CSS_LOADER_URL___10___ + \\") format('svg'),\\\\n    url(\\" + ___CSS_LOADER_URL___11___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___12___ + \\") format('embedded-opentype'),\\\\n    url(\\" + ___CSS_LOADER_URL___13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n  body {\\\\n    background: url(\\" + ___CSS_LOADER_URL___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 O9YPhh3OZdzrkj25z-J92 {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___0___ + \\") xyz;\\\\n}\\\\n\\\\n._1fj5hnOVZ8KZVIGyZbPW3p {\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n._1fj5hnOVZ8KZVIGyZbPW3p {\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url() xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url('') xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url('   ') xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(\\\\n  ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___16___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___17___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___19___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background-image: url(\\" + ___CSS_LOADER_URL___0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\") url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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._2rb58RF5u2ij-3X8XSJaVP {\\\\n  background: url(\\" + ___CSS_LOADER_URL___20___ + \\");\\\\n}\\\\n\\\\n.mrf4tRz4T71pNku_3IMH3 {\\\\n  background: url('/img-simple.png');\\\\n}\\\\n\\\\n.c5dNFA35opKWoGz7aRj0k {\\\\n  background: url(\\" + ___CSS_LOADER_URL___21___ + \\");\\\\n}\\\\n\\\\n._2Q5a0g3xEHAboOADfIxHa5 {\\\\n  background: url(\\" + ___CSS_LOADER_URL___2___ + \\");\\\\n}\\\\n\\\\n._2TX-7lb63hK5h5DzELIAbU {\\\\n  background: url(\\" + ___CSS_LOADER_URL___22___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___23___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___24___ + \\");\\\\n}\\\\n\\\\n@font-face {\\\\n  src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___27___ + \\" 1x, \\" + ___CSS_LOADER_URL___27___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x),\\\\n    image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\\\n    \\" + ___CSS_LOADER_URL___25___ + \\" 1x,\\\\n    \\" + ___CSS_LOADER_URL___26___ + \\" 2x,\\\\n    \\" + ___CSS_LOADER_URL___28___ + \\" 600dpi\\\\n  );\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___29___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___30___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___31___ + \\" 1x);\\\\n\\\\n  /* With \`url\` function */\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: -webkit-image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x,\\\\n    url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x,\\\\n    url(\\" + ___CSS_LOADER_URL___32___ + \\") 600dpi\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___4___ + \\") 2x);\\\\n\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n}\\\\n\\", \\"\\"]);
@@ -2187,7 +2187,7 @@ exports[`url option true and modules \`true\`: module 1`] = `
 exports.i(require(\\"-!../../../src/index.js??ref--4-0!./imported.css\\"), \\"\\");
 var getUrl = require(\\"../../../src/runtime/getUrl.js\\");
 var ___CSS_LOADER_URL___0___ = getUrl(require(\\"./img.png\\"));
-var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___2___ = getUrl(require(\\"package/img.png\\"));
 var ___CSS_LOADER_URL___3___ = getUrl(require(\\"./other-img.png\\"));
 var ___CSS_LOADER_URL___4___ = getUrl(require(\\"./img img.png\\"));
@@ -2196,28 +2196,28 @@ var ___CSS_LOADER_URL___6___ = getUrl(require(\\"./font.woff2\\"));
 var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\"));
 var ___CSS_LOADER_URL___8___ = getUrl(require(\\"package/font.ttf\\"));
 var ___CSS_LOADER_URL___9___ = getUrl(require(\\"./font with spaces.eot\\"));
-var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\") + \\"#svgFontName\\");
+var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\"), { hash: \\"#svgFontName\\" });
 var ___CSS_LOADER_URL___11___ = getUrl(require(\\"./font.woff2?foo=bar\\"));
-var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\") + \\"?#iefix\\");
-var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\") + \\"?#iefix\\");
+var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\"), { hash: \\"?#iefix\\" });
+var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\"), { hash: \\"?#iefix\\" });
 var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img1x.png\\"));
 var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img2x.png\\"));
 var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img.png?foo\\"));
 var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img.png?foo=bar\\"));
-var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___19___ = getUrl(require(\\"./img.png?\\"));
 var ___CSS_LOADER_URL___20___ = getUrl(require(\\"./img-simple.png\\"));
 var ___CSS_LOADER_URL___21___ = getUrl(require(\\"../url/img-simple.png\\"));
 var ___CSS_LOADER_URL___22___ = getUrl(require(\\"aliasesImg/img.png\\"));
 var ___CSS_LOADER_URL___23___ = getUrl(require(\\"./nested/img.png\\"));
 var ___CSS_LOADER_URL___24___ = getUrl(require(\\"./nested/img.png\\"));
-var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), true);
-var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), true);
-var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), true);
-var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), true);
-var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), true);
-var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\") + \\"#hash\\", true);
-var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\") + \\"?#iefix\\", true);
+var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"#hash\\", needQuotes: true });
+var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"?#iefix\\", needQuotes: true });
 var ___CSS_LOADER_URL___32___ = getUrl(require(\\"./img3x.png\\"));
 // Module
 exports.push([module.id, \\"._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___1___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\\\n    \\" + ___CSS_LOADER_URL___0___ + \\"\\\\n  );\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___2___ + \\") url(\\" + ___CSS_LOADER_URL___3___ + \\") xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(/img.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(data:image/png;base64,AAA) url(http://example.com/image.jpg) url(//example.com/image.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background-image: url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  filter: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"><filter id=\\\\\\"filter\\\\\\"><feGaussianBlur in=\\\\\\"SourceAlpha\\\\\\" stdDeviation=\\\\\\"0\\\\\\" /><feOffset dx=\\\\\\"1\\\\\\" dy=\\\\\\"2\\\\\\" result=\\\\\\"offsetblur\\\\\\" /><feFlood flood-color=\\\\\\"rgba(255,255,255,1)\\\\\\" /><feComposite in2=\\\\\\"offsetblur\\\\\\" operator=\\\\\\"in\\\\\\" /><feMerge><feMergeNode /><feMergeNode in=\\\\\\"SourceGraphic\\\\\\" /></feMerge></filter></svg>#filter');\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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.lml_5t-nQdGlKc9OtKjUO {\\\\n  filter: url(#highlight);\\\\n}\\\\n\\\\n.lml_5t-nQdGlKc9OtKjUO {\\\\n  filter: url('#line-marker');\\\\n}\\\\n\\\\n@font-face {\\\\n  src: url(\\" + ___CSS_LOADER_URL___5___ + \\") format('woff'),\\\\n    url(\\" + ___CSS_LOADER_URL___6___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___7___ + \\") format('eot'),\\\\n    url(\\" + ___CSS_LOADER_URL___8___ + \\") format('truetype'),\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n    url(\\" + ___CSS_LOADER_URL___10___ + \\") format('svg'),\\\\n    url(\\" + ___CSS_LOADER_URL___11___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___12___ + \\") format('embedded-opentype'),\\\\n    url(\\" + ___CSS_LOADER_URL___13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n  body {\\\\n    background: url(\\" + ___CSS_LOADER_URL___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 O9YPhh3OZdzrkj25z-J92 {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___0___ + \\") xyz;\\\\n}\\\\n\\\\n._1fj5hnOVZ8KZVIGyZbPW3p {\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n._1fj5hnOVZ8KZVIGyZbPW3p {\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url() xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url('') xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(\\\\\\"\\\\\\") xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url('   ') xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(\\\\n  ) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(https://raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: green url(//raw.githubusercontent.com/webpack/media/master/logo/icon.png) xyz;\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___16___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___17___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background: url(\\" + ___CSS_LOADER_URL___19___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\n  background-image: url(\\" + ___CSS_LOADER_URL___0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\") url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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._2rb58RF5u2ij-3X8XSJaVP {\\\\n  background: url(\\" + ___CSS_LOADER_URL___20___ + \\");\\\\n}\\\\n\\\\n.mrf4tRz4T71pNku_3IMH3 {\\\\n  background: url('/img-simple.png');\\\\n}\\\\n\\\\n.c5dNFA35opKWoGz7aRj0k {\\\\n  background: url(\\" + ___CSS_LOADER_URL___21___ + \\");\\\\n}\\\\n\\\\n._2Q5a0g3xEHAboOADfIxHa5 {\\\\n  background: url(\\" + ___CSS_LOADER_URL___2___ + \\");\\\\n}\\\\n\\\\n._2TX-7lb63hK5h5DzELIAbU {\\\\n  background: url(\\" + ___CSS_LOADER_URL___22___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___23___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___24___ + \\");\\\\n}\\\\n\\\\n@font-face {\\\\n  src: url(\\\\\\"//at.alicdn.com/t/font_515771_emcns5054x3whfr.eot\\\\\\");\\\\n}\\\\n\\\\n._7NvzxsKlD5xT5cUVu5Ad- {\\\\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___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___27___ + \\" 1x, \\" + ___CSS_LOADER_URL___27___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x),\\\\n    image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\\\n    \\" + ___CSS_LOADER_URL___25___ + \\" 1x,\\\\n    \\" + ___CSS_LOADER_URL___26___ + \\" 2x,\\\\n    \\" + ___CSS_LOADER_URL___28___ + \\" 600dpi\\\\n  );\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___29___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___30___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___31___ + \\" 1x);\\\\n\\\\n  /* With \`url\` function */\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: -webkit-image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x,\\\\n    url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x,\\\\n    url(\\" + ___CSS_LOADER_URL___32___ + \\") 600dpi\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___4___ + \\") 2x);\\\\n\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n}\\\\n\\", \\"\\"]);
@@ -2597,7 +2597,7 @@ exports[`url option true: module 1`] = `
 exports.i(require(\\"-!../../../src/index.js??ref--4-0!./imported.css\\"), \\"\\");
 var getUrl = require(\\"../../../src/runtime/getUrl.js\\");
 var ___CSS_LOADER_URL___0___ = getUrl(require(\\"./img.png\\"));
-var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___1___ = getUrl(require(\\"./img.png\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___2___ = getUrl(require(\\"package/img.png\\"));
 var ___CSS_LOADER_URL___3___ = getUrl(require(\\"./other-img.png\\"));
 var ___CSS_LOADER_URL___4___ = getUrl(require(\\"./img img.png\\"));
@@ -2606,28 +2606,28 @@ var ___CSS_LOADER_URL___6___ = getUrl(require(\\"./font.woff2\\"));
 var ___CSS_LOADER_URL___7___ = getUrl(require(\\"./font.eot\\"));
 var ___CSS_LOADER_URL___8___ = getUrl(require(\\"package/font.ttf\\"));
 var ___CSS_LOADER_URL___9___ = getUrl(require(\\"./font with spaces.eot\\"));
-var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\") + \\"#svgFontName\\");
+var ___CSS_LOADER_URL___10___ = getUrl(require(\\"./font.svg\\"), { hash: \\"#svgFontName\\" });
 var ___CSS_LOADER_URL___11___ = getUrl(require(\\"./font.woff2?foo=bar\\"));
-var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\") + \\"?#iefix\\");
-var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\") + \\"?#iefix\\");
+var ___CSS_LOADER_URL___12___ = getUrl(require(\\"./font.eot\\"), { hash: \\"?#iefix\\" });
+var ___CSS_LOADER_URL___13___ = getUrl(require(\\"./font with spaces.eot\\"), { hash: \\"?#iefix\\" });
 var ___CSS_LOADER_URL___14___ = getUrl(require(\\"./img1x.png\\"));
 var ___CSS_LOADER_URL___15___ = getUrl(require(\\"./img2x.png\\"));
 var ___CSS_LOADER_URL___16___ = getUrl(require(\\"./img.png?foo\\"));
 var ___CSS_LOADER_URL___17___ = getUrl(require(\\"./img.png?foo=bar\\"));
-var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\") + \\"#hash\\");
+var ___CSS_LOADER_URL___18___ = getUrl(require(\\"./img.png?foo=bar\\"), { hash: \\"#hash\\" });
 var ___CSS_LOADER_URL___19___ = getUrl(require(\\"./img.png?\\"));
 var ___CSS_LOADER_URL___20___ = getUrl(require(\\"./img-simple.png\\"));
 var ___CSS_LOADER_URL___21___ = getUrl(require(\\"../url/img-simple.png\\"));
 var ___CSS_LOADER_URL___22___ = getUrl(require(\\"aliasesImg/img.png\\"));
 var ___CSS_LOADER_URL___23___ = getUrl(require(\\"./nested/img.png\\"));
 var ___CSS_LOADER_URL___24___ = getUrl(require(\\"./nested/img.png\\"));
-var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), true);
-var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), true);
-var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), true);
-var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), true);
-var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), true);
-var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\") + \\"#hash\\", true);
-var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\") + \\"?#iefix\\", true);
+var ___CSS_LOADER_URL___25___ = getUrl(require(\\"./img1x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___26___ = getUrl(require(\\"./img2x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___27___ = getUrl(require(\\"./img img.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___28___ = getUrl(require(\\"./img3x.png\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___29___ = getUrl(require(\\"./img1x.png?foo=bar\\"), { needQuotes: true });
+var ___CSS_LOADER_URL___30___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"#hash\\", needQuotes: true });
+var ___CSS_LOADER_URL___31___ = getUrl(require(\\"./img1x.png\\"), { hash: \\"?#iefix\\", needQuotes: true });
 var ___CSS_LOADER_URL___32___ = getUrl(require(\\"./img3x.png\\"));
 // Module
 exports.push([module.id, \\".class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___0___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___1___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\\\n    \\" + ___CSS_LOADER_URL___0___ + \\"\\\\n  );\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___0___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url(\\" + ___CSS_LOADER_URL___2___ + \\") url(\\" + ___CSS_LOADER_URL___3___ + \\") xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___4___ + \\" ) xyz;\\\\n}\\\\n\\\\n.class {\\\\n  background: green url( \\" + ___CSS_LOADER_URL___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,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\");\\\\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,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\"><filter id=\\\\\\"filter\\\\\\"><feGaussianBlur in=\\\\\\"SourceAlpha\\\\\\" stdDeviation=\\\\\\"0\\\\\\" /><feOffset dx=\\\\\\"1\\\\\\" dy=\\\\\\"2\\\\\\" result=\\\\\\"offsetblur\\\\\\" /><feFlood flood-color=\\\\\\"rgba(255,255,255,1)\\\\\\" /><feComposite in2=\\\\\\"offsetblur\\\\\\" operator=\\\\\\"in\\\\\\" /><feMerge><feMergeNode /><feMergeNode in=\\\\\\"SourceGraphic\\\\\\" /></feMerge></filter></svg>#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___5___ + \\") format('woff'),\\\\n    url(\\" + ___CSS_LOADER_URL___6___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___7___ + \\") format('eot'),\\\\n    url(\\" + ___CSS_LOADER_URL___8___ + \\") format('truetype'),\\\\n    url(\\" + ___CSS_LOADER_URL___9___ + \\") format(\\\\\\"embedded-opentype\\\\\\"),\\\\n    url(\\" + ___CSS_LOADER_URL___10___ + \\") format('svg'),\\\\n    url(\\" + ___CSS_LOADER_URL___11___ + \\") format('woff2'),\\\\n    url(\\" + ___CSS_LOADER_URL___12___ + \\") format('embedded-opentype'),\\\\n    url(\\" + ___CSS_LOADER_URL___13___ + \\") format('embedded-opentype');\\\\n}\\\\n\\\\n@media (min-width: 500px) {\\\\n  body {\\\\n    background: url(\\" + ___CSS_LOADER_URL___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___0___ + \\") xyz;\\\\n}\\\\n\\\\n.a {\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x)\\\\n}\\\\n\\\\n.a {\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___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___16___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___17___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___18___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background: url(\\" + ___CSS_LOADER_URL___19___ + \\");\\\\n}\\\\n\\\\n.class {\\\\n  background-image: url(\\" + ___CSS_LOADER_URL___0___ + \\") url(\\\\\\"data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 26' fill='%23007aff'><rect width='4' height='4'/><rect x='8' y='1' width='34' height='2'/><rect y='11' width='4' height='4'/><rect x='8' y='12' width='34' height='2'/><rect y='22' width='4' height='4'/><rect x='8' y='23' width='34' height='2'/></svg>\\\\\\") url(\\" + ___CSS_LOADER_URL___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___20___ + \\");\\\\n}\\\\n\\\\n.not-resolved {\\\\n  background: url('/img-simple.png');\\\\n}\\\\n\\\\n.above-below {\\\\n  background: url(\\" + ___CSS_LOADER_URL___21___ + \\");\\\\n}\\\\n\\\\n.tilde {\\\\n  background: url(\\" + ___CSS_LOADER_URL___2___ + \\");\\\\n}\\\\n\\\\n.aliases {\\\\n  background: url(\\" + ___CSS_LOADER_URL___22___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___23___ + \\");\\\\n}\\\\n\\\\na {\\\\n  background: url(\\" + ___CSS_LOADER_URL___24___ + \\");\\\\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___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___27___ + \\" 1x, \\" + ___CSS_LOADER_URL___27___ + \\" 2x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x),\\\\n    image-set(\\" + ___CSS_LOADER_URL___25___ + \\" 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n  background-image: image-set(\\\\n    \\" + ___CSS_LOADER_URL___25___ + \\" 1x,\\\\n    \\" + ___CSS_LOADER_URL___26___ + \\" 2x,\\\\n    \\" + ___CSS_LOADER_URL___28___ + \\" 600dpi\\\\n  );\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___29___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___30___ + \\" 1x);\\\\n  background-image: image-set(\\" + ___CSS_LOADER_URL___31___ + \\" 1x);\\\\n\\\\n  /* With \`url\` function */\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: -webkit-image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: -webkit-image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x);\\\\n  background-image: image-set(\\\\n    url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x,\\\\n    url(\\" + ___CSS_LOADER_URL___15___ + \\") 2x,\\\\n    url(\\" + ___CSS_LOADER_URL___32___ + \\") 600dpi\\\\n  );\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___4___ + \\") 1x, url(\\" + ___CSS_LOADER_URL___4___ + \\") 2x);\\\\n\\\\n  background-image: image-set(url(\\" + ___CSS_LOADER_URL___14___ + \\") 1x, \\" + ___CSS_LOADER_URL___26___ + \\" 2x);\\\\n}\\\\n\\", \\"\\"]);
diff --git a/test/runtime/__snapshots__/getUrl.test.js.snap b/test/runtime/__snapshots__/getUrl.test.js.snap
index f03378f..d3f84ed 100644
--- a/test/runtime/__snapshots__/getUrl.test.js.snap
+++ b/test/runtime/__snapshots__/getUrl.test.js.snap
@@ -18,17 +18,17 @@ exports[`escape should escape url 8`] = `"\\"image\\\\\\"other.png\\""`;
 
 exports[`escape should escape url 9`] = `"\\"image\\\\nother.png\\""`;
 
-exports[`escape should escape url 10`] = `"\\"image.png\\""`;
+exports[`escape should escape url 10`] = `"image.png#hash"`;
 
-exports[`escape should escape url 11`] = `"\\"image other.png\\""`;
+exports[`escape should escape url 11`] = `"image.png#hash"`;
 
-exports[`escape should escape url 12`] = `"\\"image other.png\\""`;
+exports[`escape should escape url 12`] = `"image.png#hash"`;
 
-exports[`escape should escape url 13`] = `"image.png"`;
+exports[`escape should escape url 13`] = `"\\"image other.png#hash\\""`;
 
-exports[`escape should escape url 14`] = `"image.png"`;
+exports[`escape should escape url 14`] = `"\\"image other.png#hash\\""`;
 
-exports[`escape should escape url 15`] = `"image.png"`;
+exports[`escape should escape url 15`] = `"\\"image other.png#hash\\""`;
 
 exports[`escape should escape url 16`] = `"\\"image other.png\\""`;
 
@@ -36,12 +36,48 @@ exports[`escape should escape url 17`] = `"\\"image other.png\\""`;
 
 exports[`escape should escape url 18`] = `"\\"image other.png\\""`;
 
-exports[`escape should escape url 19`] = `"\\"image\\\\\\"other.png\\""`;
+exports[`escape should escape url 19`] = `"image.png"`;
 
-exports[`escape should escape url 20`] = `"\\"image\\\\nother.png\\""`;
+exports[`escape should escape url 20`] = `"image.png"`;
 
-exports[`escape should escape url 21`] = `"\\"image.png\\""`;
+exports[`escape should escape url 21`] = `"image.png"`;
 
-exports[`escape should escape url 22`] = `"\\"image.png\\""`;
+exports[`escape should escape url 22`] = `"\\"image other.png\\""`;
 
-exports[`escape should escape url 23`] = `"\\"image.png\\""`;
+exports[`escape should escape url 23`] = `"\\"image other.png\\""`;
+
+exports[`escape should escape url 24`] = `"\\"image other.png\\""`;
+
+exports[`escape should escape url 25`] = `"\\"image\\\\\\"other.png\\""`;
+
+exports[`escape should escape url 26`] = `"\\"image\\\\nother.png\\""`;
+
+exports[`escape should escape url 27`] = `"image.png#hash"`;
+
+exports[`escape should escape url 28`] = `"image.png#hash"`;
+
+exports[`escape should escape url 29`] = `"image.png#hash"`;
+
+exports[`escape should escape url 30`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 31`] = `"\\"image other.png\\""`;
+
+exports[`escape should escape url 32`] = `"\\"image other.png\\""`;
+
+exports[`escape should escape url 33`] = `"\\"image other.png\\""`;
+
+exports[`escape should escape url 34`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 35`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 36`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 37`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 38`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 39`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 40`] = `"\\"image other.png#hash\\""`;
+
+exports[`escape should escape url 41`] = `"\\"image other.png#hash\\""`;
diff --git a/test/runtime/getUrl.test.js b/test/runtime/getUrl.test.js
index 6f3304d..aecf8d2 100644
--- a/test/runtime/getUrl.test.js
+++ b/test/runtime/getUrl.test.js
@@ -12,9 +12,16 @@ describe('escape', () => {
     expect(getUrl('image"other.png')).toMatchSnapshot();
     expect(getUrl('image\nother.png')).toMatchSnapshot();
 
-    expect(getUrl('image.png', true)).toMatchSnapshot();
-    expect(getUrl("'image other.png'", true)).toMatchSnapshot();
-    expect(getUrl('"image other.png"', true)).toMatchSnapshot();
+    expect(getUrl('image.png', { hash: '#hash' })).toMatchSnapshot();
+    expect(getUrl('"image.png"', { hash: '#hash' })).toMatchSnapshot();
+    expect(getUrl("'image.png'", { hash: '#hash' })).toMatchSnapshot();
+    expect(getUrl('image other.png', { hash: '#hash' })).toMatchSnapshot();
+    expect(getUrl('"image other.png"', { hash: '#hash' })).toMatchSnapshot();
+    expect(getUrl("'image other.png'", { hash: '#hash' })).toMatchSnapshot();
+
+    expect(getUrl('image other.png', { needQuotes: true })).toMatchSnapshot();
+    expect(getUrl("'image other.png'", { needQuotes: true })).toMatchSnapshot();
+    expect(getUrl('"image other.png"', { needQuotes: true })).toMatchSnapshot();
 
     expect(
       getUrl({ default: 'image.png', __esModule: true })
@@ -42,13 +49,76 @@ describe('escape', () => {
     ).toMatchSnapshot();
 
     expect(
-      getUrl({ default: 'image.png', __esModule: true }, true)
+      getUrl({ default: 'image.png', __esModule: true }, { hash: '#hash' })
+    ).toMatchSnapshot();
+    expect(
+      getUrl({ default: '"image.png"', __esModule: true }, { hash: '#hash' })
+    ).toMatchSnapshot();
+    expect(
+      getUrl({ default: "'image.png'", __esModule: true }, { hash: '#hash' })
+    ).toMatchSnapshot();
+    expect(
+      getUrl(
+        { default: 'image other.png', __esModule: true },
+        { hash: '#hash' }
+      )
+    ).toMatchSnapshot();
+
+    expect(
+      getUrl(
+        { default: 'image other.png', __esModule: true },
+        { needQuotes: true }
+      )
+    ).toMatchSnapshot();
+    expect(
+      getUrl(
+        { default: "'image other.png'", __esModule: true },
+        { needQuotes: true }
+      )
+    ).toMatchSnapshot();
+    expect(
+      getUrl(
+        { default: '"image other.png"', __esModule: true },
+        { needQuotes: true }
+      )
+    ).toMatchSnapshot();
+
+    expect(
+      getUrl('image other.png', { hash: '#hash', needQuotes: true })
+    ).toMatchSnapshot();
+    expect(
+      getUrl('"image other.png"', { hash: '#hash', needQuotes: true })
+    ).toMatchSnapshot();
+    expect(
+      getUrl("'image other.png'", { hash: '#hash', needQuotes: true })
+    ).toMatchSnapshot();
+    expect(
+      getUrl('image other.png', { hash: '#hash', needQuotes: true })
+    ).toMatchSnapshot();
+
+    expect(
+      getUrl(
+        { default: 'image other.png', __esModule: true },
+        { hash: '#hash', needQuotes: true }
+      )
+    ).toMatchSnapshot();
+    expect(
+      getUrl(
+        { default: '"image other.png"', __esModule: true },
+        { hash: '#hash', needQuotes: true }
+      )
     ).toMatchSnapshot();
     expect(
-      getUrl({ default: "'image.png'", __esModule: true }, true)
+      getUrl(
+        { default: "'image other.png'", __esModule: true },
+        { hash: '#hash', needQuotes: true }
+      )
     ).toMatchSnapshot();
     expect(
-      getUrl({ default: '"image.png"', __esModule: true }, true)
+      getUrl(
+        { default: 'image other.png', __esModule: true },
+        { hash: '#hash', needQuotes: true }
+      )
     ).toMatchSnapshot();
   });
 });