diff --git a/README.md b/README.md index ce24c130..c8ddee5a 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Type: `Boolean|Object` Default: `true` By default every loadable attributes (for example - ``) is imported (`const img = require('./image.png')` or `import img from "./image.png""`). -You may need to specify loaders for images in your configuration (recommended `file-loader` or `url-loader`). +You may need to specify loaders for images in your configuration (recommended [`asset modules`](https://webpack.js.org/guides/asset-modules/)). Supported tags and attributes: @@ -569,7 +569,7 @@ module.exports = { }, { test: /\.jpg$/, - loader: 'file-loader', + type: 'asset/resource', }, ], }, @@ -597,8 +597,14 @@ module.exports = { module.exports = { module: { rules: [ - { test: /\.jpg$/, loader: 'file-loader' }, - { test: /\.png$/, loader: 'url-loader' }, + { + test: /\.jpg$/, + type: 'asset/resource', + }, + { + test: /\.png$/, + type: 'asset/inline', + }, ], }, output: { @@ -680,9 +686,16 @@ a { module.exports = { module: { rules: [ + { + test: /\.html$/, + type: 'asset/resource', + generator: { + filename: '[name][ext]', + }, + }, { test: /\.html$/i, - use: ['file-loader?name=[name].[ext]', 'extract-loader', 'html-loader'], + use: ['extract-loader', 'html-loader'], }, { test: /\.js$/i, @@ -691,7 +704,7 @@ module.exports = { }, { test: /\.file.js$/i, - loader: 'file-loader', + type: 'asset/resource', }, { test: /\.css$/i, @@ -700,7 +713,7 @@ module.exports = { }, { test: /\.file.css$/i, - loader: 'file-loader', + type: 'asset/resource', }, ], }, @@ -802,26 +815,37 @@ module.exports = { A very common scenario is exporting the HTML into their own _.html_ file, to serve them directly instead of injecting with javascript. This can be achieved -with a combination of 3 loaders: +with a combination of 2 loaders: -- [file-loader](https://github.com/webpack/file-loader) - [extract-loader](https://github.com/peerigon/extract-loader) - html-loader +and [`asset modules`](https://webpack.js.org/guides/asset-modules/) + The html-loader will parse the URLs, require the images and everything you expect. The extract loader will parse the javascript back into a proper html -file, ensuring images are required and point to proper path, and the file loader +file, ensuring images are required and point to proper path, and the [`asset modules`](https://webpack.js.org/guides/asset-modules/) will write the _.html_ file for you. Example: **webpack.config.js** ```js module.exports = { + output: { + assetModuleFilename: '[name][ext]', + }, module: { rules: [ + { + test: /\.html$/, + type: 'asset/resource', + generator: { + filename: '[name][ext]', + }, + }, { test: /\.html$/i, - use: ['file-loader?name=[name].[ext]', 'extract-loader', 'html-loader'], + use: ['extract-loader', 'html-loader'], }, ], }, diff --git a/package-lock.json b/package-lock.json index de24c5c7..265121f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5024,9 +5024,9 @@ } }, "electron-to-chromium": { - "version": "1.3.657", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.657.tgz", - "integrity": "sha512-/9ROOyvEflEbaZFUeGofD+Tqs/WynbSTbNgNF+/TJJxH1ePD/e6VjZlDJpW3FFFd3nj5l3Hd8ki2vRwy+gyRFw==", + "version": "1.3.659", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.659.tgz", + "integrity": "sha512-VPc1LcvuQYGjam6k7JcB6uJFTMo2YNlJ6rSbwbxApZQdow7X81kh/vDB6LB5B8DNmvkbKnpZkLmpKmnvoKA+Gw==", "dev": true }, "emittery": { @@ -6033,40 +6033,6 @@ "flat-cache": "^3.0.4" } }, - "file-loader": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", - "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", - "dev": true, - "requires": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -12883,9 +12849,9 @@ } }, "uglify-js": { - "version": "3.12.6", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.6.tgz", - "integrity": "sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw==", + "version": "3.12.7", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.7.tgz", + "integrity": "sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q==", "dev": true, "optional": true }, @@ -13003,41 +12969,6 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "url-loader": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", - "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", - "dev": true, - "requires": { - "loader-utils": "^2.0.0", - "mime-types": "^2.1.27", - "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -13140,9 +13071,9 @@ } }, "watchpack": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.1.0.tgz", - "integrity": "sha512-UjgD1mqjkG99+3lgG36at4wPnUXNvis2v1utwTgQ43C22c4LD71LsYMExdWXh4HZ+RmW+B0t1Vrg2GpXAkTOQw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.1.1.tgz", + "integrity": "sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -13156,9 +13087,9 @@ "dev": true }, "webpack": { - "version": "5.21.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.21.1.tgz", - "integrity": "sha512-H/fjQiDETEZDKoZm/LhvDBxOIKf9rfOdqb2pKTHRvBFMIRtwAwYlPCgBd0gc5xiDG5DqkxAiFZgAF/4H41wMuQ==", + "version": "5.21.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.21.2.tgz", + "integrity": "sha512-xHflCenx+AM4uWKX71SWHhxml5aMXdy2tu/vdi4lClm7PADKxlyDAFFN1rEFzNV0MAoPpHtBeJnl/+K6F4QBPg==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", diff --git a/package.json b/package.json index 73820bab..3ef524d2 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "eslint": "^7.19.0", "eslint-config-prettier": "^7.2.0", "eslint-plugin-import": "^2.22.1", - "file-loader": "^6.2.0", "handlebars": "^4.7.6", "husky": "^4.3.8", "jest": "^26.6.3", @@ -74,8 +73,7 @@ "prettier": "^2.1.2", "standard-version": "^9.0.0", "unescape-unicode": "^0.2.0", - "url-loader": "^4.1.1", - "webpack": "^5.19.0" + "webpack": "^5.21.2" }, "keywords": [ "webpack", diff --git a/test/__snapshots__/esModule-option.test.js.snap b/test/__snapshots__/esModule-option.test.js.snap index 0f1f5dbf..00fe3d9d 100644 --- a/test/__snapshots__/esModule-option.test.js.snap +++ b/test/__snapshots__/esModule-option.test.js.snap @@ -21,7 +21,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -500,7 +500,7 @@ var ___HTML_LOADER_IMPORT_12___ = require(\\"./module.file.js\\"); var ___HTML_LOADER_IMPORT_13___ = require(\\"./fallback.file.js\\"); var ___HTML_LOADER_IMPORT_14___ = require(\\"aliasImageWithSpace\\"); var ___HTML_LOADER_IMPORT_15___ = require(\\"./webpack.svg\\"); -var ___HTML_LOADER_IMPORT_16___ = require(\\"!!url-loader!./pixel.png\\"); +var ___HTML_LOADER_IMPORT_16___ = require(\\"./pixel.png?url\\"); var ___HTML_LOADER_IMPORT_17___ = require(\\"./site.webmanifest\\"); var ___HTML_LOADER_IMPORT_18___ = require(\\"./browserconfig.xml\\"); var ___HTML_LOADER_IMPORT_19___ = require(\\"./sound.mp3\\"); @@ -979,7 +979,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index 36723c0d..6d64b536 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -156,7 +156,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; diff --git a/test/__snapshots__/minimize-option.test.js.snap b/test/__snapshots__/minimize-option.test.js.snap index e0b2bd4d..947415cd 100644 --- a/test/__snapshots__/minimize-option.test.js.snap +++ b/test/__snapshots__/minimize-option.test.js.snap @@ -21,7 +21,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -500,7 +500,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -979,7 +979,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -1084,7 +1084,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -1563,7 +1563,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -1651,7 +1651,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; diff --git a/test/__snapshots__/sources-option.test.js.snap b/test/__snapshots__/sources-option.test.js.snap index c7cf5c70..d2582025 100644 --- a/test/__snapshots__/sources-option.test.js.snap +++ b/test/__snapshots__/sources-option.test.js.snap @@ -770,7 +770,7 @@ var ___HTML_LOADER_REPLACEMENT_6___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(_ var ___HTML_LOADER_REPLACEMENT_7___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_7___); var ___HTML_LOADER_REPLACEMENT_8___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_8___); var ___HTML_LOADER_REPLACEMENT_9___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_9___); -var code = \\"\\\\n\\\\n

My First Heading

\\\\n

My first paragraph.

\\\\n

An Unordered HTML List

\\\\n\\\\n\\\\n\\\\n

An Ordered HTML List

\\\\n\\\\n
    \\\\n
  1. Coffee
  2. \\\\n
  3. Tea
  4. \\\\n
  5. Milk
  6. \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
Foo
\\\\n\\\\n\\\\n
BAR
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n \\\\n \\\\n \\\\\\"Flowers\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Smiley\\\\n\\\\n
\\\\n First name:
\\\\n \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nT ex t \\\\n\\\\n
\\\\n\\\\n]]>\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nlink text\\\\n\\\\nCall me\\\\n\\\\n-->\\\\n-->\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n\\\\n<div id = "character">\\\\n© 2007\\\\nor\\\\n© 2007\\\\n\\\\n
\\\\n\\\\n\\\\\\"Red\\\\n
\\\\n Written by Jon Doe.
\\\\n Visit us at:
\\\\n Example.com
\\\\n Box 564, Disneyland
\\\\n USA\\\\n
\\\\nlink\\\\nStart Chat\\\\nStart Chat\\\\nStart Chat\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Test\\\\\\"\\\\n\\\\n\\\\n\\\\n Test \\\\n\\\\ntest\\\\ntest\\\\ntest\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n

Text

\\\\n

Text

\\\\n

Text

\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nfoo bar\\\\n\\\\nText\\\\nText\\\\n\\\\n\\\\n\\\\n
\\\\n\\\\nVisit our HTML tutorial\\\\nVisit our HTML tutorial\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
text
\\\\n
text
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"multi\\\\nline\\\\nalt\\\\\\"\\\\n\\\\n\\\\\\"Red\\\\n\\\\n\\\\\\" alt=\\\\\\"<%= name %>\\\\\\" src=\\\\\\"<%= imgsrc %>\\\\\\" />\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\"; +var code = \\"\\\\n\\\\n

My First Heading

\\\\n

My first paragraph.

\\\\n

An Unordered HTML List

\\\\n\\\\n
    \\\\n
  • Coffee
  • \\\\n
  • Tea
  • \\\\n
  • Milk
  • \\\\n
\\\\n\\\\n

An Ordered HTML List

\\\\n\\\\n
    \\\\n
  1. Coffee
  2. \\\\n
  3. Tea
  4. \\\\n
  5. Milk
  6. \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
Foo
\\\\n\\\\n\\\\n
BAR
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n \\\\n \\\\n \\\\\\"Flowers\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Smiley\\\\n\\\\n
\\\\n First name:
\\\\n \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nT ex t \\\\n\\\\n
\\\\n\\\\n]]>\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nlink text\\\\n\\\\nCall me\\\\n\\\\n-->\\\\n-->\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n\\\\n<div id = "character">\\\\n© 2007\\\\nor\\\\n© 2007\\\\n\\\\n
\\\\n\\\\n\\\\\\"Red\\\\n
\\\\n Written by Jon Doe.
\\\\n Visit us at:
\\\\n Example.com
\\\\n Box 564, Disneyland
\\\\n USA\\\\n
\\\\nlink\\\\nStart Chat\\\\nStart Chat\\\\nStart Chat\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Test\\\\\\"\\\\n\\\\n\\\\n\\\\n Test \\\\n\\\\ntest\\\\ntest\\\\ntest\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n

Text

\\\\n

Text

\\\\n

Text

\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nfoo bar\\\\n\\\\nText\\\\nText\\\\n\\\\n\\\\n\\\\n
\\\\n\\\\nVisit our HTML tutorial\\\\nVisit our HTML tutorial\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
text
\\\\n
text
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"multi\\\\nline\\\\nalt\\\\\\"\\\\n\\\\n\\\\\\"Red\\\\n\\\\n\\\\\\" alt=\\\\\\"<%= name %>\\\\\\" src=\\\\\\"<%= imgsrc %>\\\\\\" />\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\"; // Exports export default code;" `; @@ -1112,12 +1112,12 @@ image.png -\\"\\" +\\"\\" \\"\\" @@ -1227,7 +1227,7 @@ import ___HTML_LOADER_IMPORT_11___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_12___ from \\"./fallback.file.json\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./preprocessor.hbs\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; -import ___HTML_LOADER_IMPORT_15___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_15___ from \\"./pixel.png?url\\"; // Module var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___); var ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___, { maybeNeedQuotes: true }); @@ -1706,7 +1706,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -2168,7 +2168,7 @@ exports[`'sources' option should not handle sources with a "boolean" notation eq exports[`'sources' option should not handle sources with a "boolean" notation equals "false": module 1`] = ` "// Module -var code = \\"\\\\n\\\\n

My First Heading

\\\\n

My first paragraph.

\\\\n

An Unordered HTML List

\\\\n\\\\n
    \\\\n
  • Coffee
  • \\\\n
  • Tea
  • \\\\n
  • Milk
  • \\\\n
\\\\n\\\\n

An Ordered HTML List

\\\\n\\\\n
    \\\\n
  1. Coffee
  2. \\\\n
  3. Tea
  4. \\\\n
  5. Milk
  6. \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
Foo
\\\\n\\\\n\\\\n
BAR
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n \\\\n \\\\n \\\\\\"Flowers\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Smiley\\\\n\\\\n
\\\\n First name:
\\\\n \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nT ex t \\\\n\\\\n
\\\\n\\\\n]]>\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nlink text\\\\n\\\\nCall me\\\\n\\\\n-->\\\\n-->\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n\\\\n<div id = "character">\\\\n© 2007\\\\nor\\\\n© 2007\\\\n\\\\n
\\\\n\\\\n\\\\\\"Red\\\\n
\\\\n Written by Jon Doe.
\\\\n Visit us at:
\\\\n Example.com
\\\\n Box 564, Disneyland
\\\\n USA\\\\n
\\\\nlink\\\\nStart Chat\\\\nStart Chat\\\\nStart Chat\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Test\\\\\\"\\\\n\\\\n\\\\n\\\\n Test \\\\n\\\\ntest\\\\ntest\\\\ntest\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n

Text

\\\\n

Text

\\\\n

Text

\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nfoo bar\\\\n\\\\nText\\\\nText\\\\n\\\\n\\\\n\\\\n
\\\\n\\\\nVisit our HTML tutorial\\\\nVisit our HTML tutorial\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
text
\\\\n
text
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"multi\\\\nline\\\\nalt\\\\\\"\\\\n\\\\n\\\\\\"Red\\\\n\\\\n\\\\\\" alt=\\\\\\"<%= name %>\\\\\\" src=\\\\\\"<%= imgsrc %>\\\\\\" />\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\"; +var code = \\"\\\\n\\\\n

My First Heading

\\\\n

My first paragraph.

\\\\n

An Unordered HTML List

\\\\n\\\\n
    \\\\n
  • Coffee
  • \\\\n
  • Tea
  • \\\\n
  • Milk
  • \\\\n
\\\\n\\\\n

An Ordered HTML List

\\\\n\\\\n
    \\\\n
  1. Coffee
  2. \\\\n
  3. Tea
  4. \\\\n
  5. Milk
  6. \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
Foo
\\\\n\\\\n\\\\n
BAR
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n \\\\n \\\\n \\\\\\"Flowers\\\\\\"\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Smiley\\\\n\\\\n
\\\\n First name:
\\\\n \\\\n
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nT ex t \\\\n\\\\n
\\\\n\\\\n]]>\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\nlink text\\\\n\\\\nCall me\\\\n\\\\n-->\\\\n-->\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n\\\\n<div id = "character">\\\\n© 2007\\\\nor\\\\n© 2007\\\\n\\\\n
\\\\n\\\\n\\\\\\"Red\\\\n
\\\\n Written by Jon Doe.
\\\\n Visit us at:
\\\\n Example.com
\\\\n Box 564, Disneyland
\\\\n USA\\\\n
\\\\nlink\\\\nStart Chat\\\\nStart Chat\\\\nStart Chat\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Elva\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"Test\\\\\\"\\\\n\\\\n\\\\n\\\\n Test \\\\n\\\\ntest\\\\ntest\\\\ntest\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n

Text

\\\\n

Text

\\\\n

Text

\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\\\"test\\\\\\"/\\\\n\\\\n\\\\n\\\\\\"Elva\\\\n\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\nfoo bar\\\\n\\\\nText\\\\nText\\\\n\\\\n\\\\n\\\\n
\\\\n\\\\nVisit our HTML tutorial\\\\nVisit our HTML tutorial\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
text
\\\\n
text
\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"\\\\\\"\\\\n\\\\n\\\\\\"multi\\\\nline\\\\nalt\\\\\\"\\\\n\\\\n\\\\\\"Red\\\\n\\\\n\\\\\\" alt=\\\\\\"<%= name %>\\\\\\" src=\\\\\\"<%= imgsrc %>\\\\\\" />\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\"; // Exports export default code;" `; @@ -2499,12 +2499,12 @@ image.png -\\"\\" +\\"\\" \\"\\" @@ -2615,7 +2615,7 @@ var ___HTML_LOADER_IMPORT_12___ = require(\\"./module.file.js\\"); var ___HTML_LOADER_IMPORT_13___ = require(\\"./fallback.file.js\\"); var ___HTML_LOADER_IMPORT_14___ = require(\\"aliasImageWithSpace\\"); var ___HTML_LOADER_IMPORT_15___ = require(\\"./webpack.svg\\"); -var ___HTML_LOADER_IMPORT_16___ = require(\\"!!url-loader!./pixel.png\\"); +var ___HTML_LOADER_IMPORT_16___ = require(\\"./pixel.png?url\\"); var ___HTML_LOADER_IMPORT_17___ = require(\\"./site.webmanifest\\"); var ___HTML_LOADER_IMPORT_18___ = require(\\"./browserconfig.xml\\"); var ___HTML_LOADER_IMPORT_19___ = require(\\"./sound.mp3\\"); @@ -3094,7 +3094,7 @@ var ___HTML_LOADER_IMPORT_12___ = require(\\"./module.file.js\\"); var ___HTML_LOADER_IMPORT_13___ = require(\\"./fallback.file.js\\"); var ___HTML_LOADER_IMPORT_14___ = require(\\"aliasImageWithSpace\\"); var ___HTML_LOADER_IMPORT_15___ = require(\\"./webpack.svg\\"); -var ___HTML_LOADER_IMPORT_16___ = require(\\"!!url-loader!./pixel.png\\"); +var ___HTML_LOADER_IMPORT_16___ = require(\\"./pixel.png?url\\"); var ___HTML_LOADER_IMPORT_17___ = require(\\"./site.webmanifest\\"); var ___HTML_LOADER_IMPORT_18___ = require(\\"./browserconfig.xml\\"); var ___HTML_LOADER_IMPORT_19___ = require(\\"./sound.mp3\\"); @@ -3573,7 +3573,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -4052,7 +4052,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -4531,7 +4531,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -5010,7 +5010,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; @@ -5479,7 +5479,7 @@ import ___HTML_LOADER_IMPORT_2___ from \\"aliasImg\\"; import ___HTML_LOADER_IMPORT_3___ from \\"./icons.svg\\"; import ___HTML_LOADER_IMPORT_4___ from \\"./image image.png\\"; import ___HTML_LOADER_IMPORT_5___ from \\"aliasImageWithSpace\\"; -import ___HTML_LOADER_IMPORT_6___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_6___ from \\"./pixel.png?url\\"; // Module var ___HTML_LOADER_REPLACEMENT_0___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___); var ___HTML_LOADER_REPLACEMENT_1___ = ___HTML_LOADER_GET_SOURCE_FROM_IMPORT___(___HTML_LOADER_IMPORT_0___, { maybeNeedQuotes: true }); @@ -5938,7 +5938,7 @@ import ___HTML_LOADER_IMPORT_12___ from \\"./module.file.js\\"; import ___HTML_LOADER_IMPORT_13___ from \\"./fallback.file.js\\"; import ___HTML_LOADER_IMPORT_14___ from \\"aliasImageWithSpace\\"; import ___HTML_LOADER_IMPORT_15___ from \\"./webpack.svg\\"; -import ___HTML_LOADER_IMPORT_16___ from \\"!!url-loader!./pixel.png\\"; +import ___HTML_LOADER_IMPORT_16___ from \\"./pixel.png?url\\"; import ___HTML_LOADER_IMPORT_17___ from \\"./site.webmanifest\\"; import ___HTML_LOADER_IMPORT_18___ from \\"./browserconfig.xml\\"; import ___HTML_LOADER_IMPORT_19___ from \\"./sound.mp3\\"; diff --git a/test/fixtures/simple.html b/test/fixtures/simple.html index 162fcfc7..75313204 100644 --- a/test/fixtures/simple.html +++ b/test/fixtures/simple.html @@ -323,12 +323,12 @@

An Ordered HTML List

- + diff --git a/test/helpers/getCompiler.js b/test/helpers/getCompiler.js index e559eea4..3ae75764 100644 --- a/test/helpers/getCompiler.js +++ b/test/helpers/getCompiler.js @@ -15,6 +15,7 @@ export default (fixture, loaderOptions = {}, config = {}) => { chunkFilename: '[name].chunk.js', publicPath: '/webpack/public/path/', library: '___TEST___', + assetModuleFilename: '[name][ext]', }, module: { rules: [ @@ -27,28 +28,22 @@ export default (fixture, loaderOptions = {}, config = {}) => { }, ], }, + { + resourceQuery: /\?url$/, + type: 'asset/inline', + }, { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2|ogg|pdf|vtt|webp|xml|webmanifest|mp3|mp4)$/i, - loader: 'file-loader', - options: { name: '[name].[ext]' }, + resourceQuery: /^(?!.*\?url).*$/, + type: 'asset/resource', }, { test: /\.file.css$/i, - rules: [ - { - loader: 'file-loader', - options: { name: '[name].[ext]' }, - }, - ], + type: 'asset/resource', }, { test: /\.file.js$/i, - rules: [ - { - loader: 'file-loader', - options: { name: '[name].[ext]' }, - }, - ], + type: 'asset/resource', }, ], }, diff --git a/test/sources-option.test.js b/test/sources-option.test.js index 201025ad..a275252b 100644 --- a/test/sources-option.test.js +++ b/test/sources-option.test.js @@ -276,10 +276,14 @@ describe("'sources' option", () => { }, ], }, + { + resourceQuery: /\?url$/, + type: 'asset/inline', + }, { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2|ogg|pdf|vtt|webp|xml|webmanifest|mp3|mp4|css)$/i, - loader: 'file-loader', - options: { esModule: false, name: '[name].[ext]' }, + resourceQuery: /^(?!.*\?url).*$/, + type: 'asset/resource', }, ], }, @@ -311,10 +315,14 @@ describe("'sources' option", () => { }, ], }, + { + resourceQuery: /\?url$/, + type: 'asset/inline', + }, { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2|ogg|pdf|vtt|webp|xml|webmanifest|mp3|mp4|css)$/i, - loader: 'file-loader', - options: { esModule: true, name: '[name].[ext]' }, + resourceQuery: /^(?!.*\?url).*$/, + type: 'asset/resource', }, ], }, @@ -346,10 +354,14 @@ describe("'sources' option", () => { }, ], }, + { + resourceQuery: /\?url$/, + type: 'asset/inline', + }, { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2|ogg|pdf|vtt|webp|xml|webmanifest|mp3|mp4|css)$/i, - loader: 'file-loader', - options: { esModule: false, name: '[name].[ext]' }, + resourceQuery: /^(?!.*\?url).*$/, + type: 'asset/resource', }, ], }, @@ -381,10 +393,14 @@ describe("'sources' option", () => { }, ], }, + { + resourceQuery: /\?url$/, + type: 'asset/inline', + }, { test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2|ogg|pdf|vtt|webp|xml|webmanifest|mp3|mp4|css)$/i, - loader: 'file-loader', - options: { esModule: true, name: '[name].[ext]' }, + resourceQuery: /^(?!.*\?url).*$/, + type: 'asset/resource', }, ], },