diff --git a/.changeset/dedupe-extracted-comments-linear.md b/.changeset/dedupe-extracted-comments-linear.md new file mode 100644 index 00000000..8956a222 --- /dev/null +++ b/.changeset/dedupe-extracted-comments-linear.md @@ -0,0 +1,5 @@ +--- +"minimizer-webpack-plugin": patch +--- + +deduplicate extracted comments in linear time, so builds stay fast when an asset contains many distinct preserved comments diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d72efeec..726da5d7 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -118,6 +118,22 @@ jobs: if: matrix.node-version == '14.x' || matrix.node-version == '16.x' run: npm install -D --no-save cssnano@^6 --force + - name: Pin terser to the locked version (Node 10/12/14) + # npm 6 (bundled with Node <= 14) can't read the lockfileVersion 3 + # package-lock.json, so the install step re-resolves `terser` to the + # latest match of its range instead of the locked version (and + # rewrites package-lock.json to v1 in the process). A newer terser + # changes the minified output, which breaks the snapshots. Read the + # locked version from the pristine committed lockfile and reinstall + # that exact version so these rows match the snapshots. + if: matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' + shell: bash + run: | + git show HEAD:package-lock.json > pristine-package-lock.json + TERSER_VERSION="$(node -e "process.stdout.write(require('./pristine-package-lock.json').packages['node_modules/terser'].version)")" + rm -f pristine-package-lock.json + npm install -D --no-save --ignore-scripts --force "terser@${TERSER_VERSION}" + - name: Install webpack ${{ matrix.webpack-version }} if: matrix.webpack-version != 'latest' run: npm i webpack@${{ matrix.webpack-version }} diff --git a/jest.config.js b/jest.config.js index b5b7df0c..626c071c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,10 +1,23 @@ // The bundled CSS minimizers (`cssnano@7`, `@swc/css`, `lightningcss`, // `esbuild@0.27`) require modern Node and don't reliably install on the // Windows agents. Skip the dedicated CSS test file outright on rows that -// can't run them so we don't end up with stale or missing snapshots. +// can't run them so we don't end up with stale or missing snapshots. The +// `@swc/html` minimizers require Node >= 14, so the dedicated swc-html file +// is skipped on older Node for the same reason. const NODE_MAJOR = Number(process.versions.node.split(".")[0]); const IS_WINDOWS = process.platform === "win32"; const RUN_CSS_TESTS = NODE_MAJOR >= 18 && !IS_WINDOWS; +const RUN_SWC_HTML_TESTS = NODE_MAJOR >= 14; + +const testPathIgnorePatterns = []; + +if (!RUN_CSS_TESTS) { + testPathIgnorePatterns.push("/test/css-minify-option\\.test\\.js$"); +} + +if (!RUN_SWC_HTML_TESTS) { + testPathIgnorePatterns.push("/test/swc-html-minify-option\\.test\\.js$"); +} module.exports = { testEnvironment: "node", @@ -13,7 +26,6 @@ module.exports = { // routinely take longer than that. testTimeout: 60000, coveragePathIgnorePatterns: ["src/serialize-javascript.js"], - testPathIgnorePatterns: RUN_CSS_TESTS - ? [] - : ["/test/css-minify-option\\.test\\.js$"], + snapshotSerializers: ["/test/helpers/snapshotHashSerializer.js"], + testPathIgnorePatterns, }; diff --git a/package-lock.json b/package-lock.json index d2edef86..e8136371 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "serialize-javascript": "^7.0.5", "typescript": "^6.0.3", "uglify-js": "^3.19.3", - "webpack": "^5.101.0", + "webpack": "^5.107.2", "webpack-cli": "^4.10.0", "worker-loader": "^3.0.8" }, @@ -5395,22 +5395,13 @@ "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -8620,9 +8611,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.0.tgz", - "integrity": "sha512-otxSQPw4lkOZWkHpB3zaEQs6gWYEsmX4xQF68ElXC/TWvGxGMSGOvoNbaLXm6/cS/fSfHtsEdw90y20PCd+sCA==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.22.0.tgz", + "integrity": "sha512-xYcDWrpELkFzz9SpZ3PlI6Eu6eD93Yf0WLDRxikGhWJ3MAir2SNZTIVCVZqZ/NUyx8AdMc2gT9C0gPiw18kG+A==", "dev": true, "license": "MIT", "dependencies": { @@ -8801,9 +8792,9 @@ } }, "node_modules/es-module-lexer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", - "integrity": "sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", + "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", "dev": true, "license": "MIT" }, @@ -13309,9 +13300,9 @@ } }, "node_modules/loader-runner": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", - "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.2.tgz", + "integrity": "sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==", "dev": true, "license": "MIT", "engines": { @@ -17926,9 +17917,9 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz", - "integrity": "sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.6.0.tgz", + "integrity": "sha512-Eum+5ajkaOhf5KbM26osvv21kLD7BaGqQ1UA4Ami4arYwylmGUQTgHFpHDdmJod1q4QXa66p0to/FBKID+J1vA==", "dev": true, "license": "MIT", "dependencies": { @@ -17948,12 +17939,39 @@ "webpack": "^5.1.0" }, "peerDependenciesMeta": { + "@minify-html/node": { + "optional": true + }, "@swc/core": { "optional": true }, + "@swc/css": { + "optional": true + }, + "@swc/html": { + "optional": true + }, + "clean-css": { + "optional": true + }, + "cssnano": { + "optional": true + }, + "csso": { + "optional": true + }, "esbuild": { "optional": true }, + "html-minifier-terser": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "postcss": { + "optional": true + }, "uglify-js": { "optional": true } @@ -18730,13 +18748,12 @@ } }, "node_modules/webpack": { - "version": "5.106.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.106.2.tgz", - "integrity": "sha512-wGN3qcrBQIFmQ/c0AiOAQBvrZ5lmY8vbbMv4Mxfgzqd/B6+9pXtLo73WuS1dSGXM5QYY3hZnIbvx+K1xxe6FyA==", + "version": "5.107.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.107.2.tgz", + "integrity": "sha512-v7RhXaJbpMlV0D7hC7lb2EbnxkoeUqf9qhKr6lozx3Q48pmFrqqNRmZFUEGmi7pSwm6fCQ2H1IjvCkHqdpVdjQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", @@ -18746,20 +18763,20 @@ "acorn-import-phases": "^1.0.3", "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.20.0", - "es-module-lexer": "^2.0.0", + "enhanced-resolve": "^5.22.0", + "es-module-lexer": "^2.1.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", - "loader-runner": "^4.3.1", + "loader-runner": "^4.3.2", "mime-db": "^1.54.0", "neo-async": "^2.6.2", "schema-utils": "^4.3.3", "tapable": "^2.3.0", - "terser-webpack-plugin": "^5.3.17", + "terser-webpack-plugin": "^5.5.0", "watchpack": "^2.5.1", - "webpack-sources": "^3.3.4" + "webpack-sources": "^3.5.0" }, "bin": { "webpack": "bin/webpack.js" @@ -18851,9 +18868,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.4.0.tgz", - "integrity": "sha512-gHwIe1cgBvvfLeu1Yz/dcFpmHfKDVxxyqI+kzqmuxZED81z2ChxpyqPaWcNqigPywhaEke7AjSGga+kxY55gjQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.5.0.tgz", + "integrity": "sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index ec1c65eb..ef01e4a8 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "serialize-javascript": "^7.0.5", "typescript": "^6.0.3", "uglify-js": "^3.19.3", - "webpack": "^5.101.0", + "webpack": "^5.107.2", "webpack-cli": "^4.10.0", "worker-loader": "^3.0.8" }, diff --git a/src/utils.js b/src/utils.js index ea5c035f..9bdcaaab 100644 --- a/src/utils.js +++ b/src/utils.js @@ -223,6 +223,8 @@ async function terserMinify( // Redefine the comments function to extract and preserve // comments according to the two conditions + const seenComments = new Set(extractedComments); + return (astNode, comment) => { if ( /** @type {{ extract: ExtractCommentsFunction }} */ @@ -234,7 +236,8 @@ async function terserMinify( : `//${comment.value}`; // Don't include duplicate comments - if (!extractedComments.includes(commentText)) { + if (!seenComments.has(commentText)) { + seenComments.add(commentText); extractedComments.push(commentText); } } @@ -477,6 +480,8 @@ async function uglifyJsMinify( // Redefine the comments function to extract and preserve // comments according to the two conditions + const seenComments = new Set(extractedComments); + return (astNode, comment) => { if ( /** @type {{ extract: ExtractCommentsFunction }} */ @@ -488,7 +493,8 @@ async function uglifyJsMinify( : `//${comment.value}`; // Don't include duplicate comments - if (!extractedComments.includes(commentText)) { + if (!seenComments.has(commentText)) { + seenComments.add(commentText); extractedComments.push(commentText); } } diff --git a/test/__snapshots__/TerserPlugin.test.js.snap b/test/__snapshots__/TerserPlugin.test.js.snap index ed478a53..e404cc18 100644 --- a/test/__snapshots__/TerserPlugin.test.js.snap +++ b/test/__snapshots__/TerserPlugin.test.js.snap @@ -57,7 +57,7 @@ exports[`MinimizerPlugin should emit an error on a broken code in parallel mode: exports[`MinimizerPlugin should not fail when only a js minimizer is set up but the compilation emits non-js assets: assets 1`] = ` Object { - "04f1ffca8fe68614c9da.css": "/* a comment */ + "__hash0__.css": "/* a comment */ .foo { color: red; @@ -69,13 +69,7 @@ Object { padding: 10px; } ", - "110900aa451370bc52ed.json": { - "foo": "bar", - "bar": [ - "baz" - ] -}, - "598697787b4a668faaa0.html": " + "__hash1__.html": " @@ -88,7 +82,13 @@ Object { ", - "main.js": "(()=>{var t={292(t,e,r){\\"use strict\\";t.exports=r.p+\\"04f1ffca8fe68614c9da.css\\"},740(t,e,r){\\"use strict\\";t.exports=r.p+\\"598697787b4a668faaa0.html\\"},437(t,e,r){\\"use strict\\";t.exports=r.p+\\"110900aa451370bc52ed.json\\"}},e={};function r(o){var c=e[o];if(void 0!==c)return c.exports;var n=e[o]={exports:{}};return t[o](n,n.exports,r),n.exports}r.m=t,r.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.g.importScripts&&(t=r.g.location+\\"\\");var e=r.g.document;if(!t&&e&&(e.currentScript&&\\"SCRIPT\\"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var o=e.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),r.p=t})(),r.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(r(292),r.b)),console.log(new URL(r(437),r.b)),console.log(new URL(r(740),r.b))})();", + "__hash2__.json": { + "foo": "bar", + "bar": [ + "baz" + ] +}, + "main.js": "(()=>{var t={292(t,e,r){\\"use strict\\";t.exports=r.p+\\"__hash0__.css\\"},740(t,e,r){\\"use strict\\";t.exports=r.p+\\"__hash1__.html\\"},437(t,e,r){\\"use strict\\";t.exports=r.p+\\"__hash2__.json\\"}},e={};function r(o){var c=e[o];if(void 0!==c)return c.exports;var n=e[o]={exports:{}};return t[o](n,n.exports,r),n.exports}r.m=t,r.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.g.importScripts&&(t=r.g.location+\\"\\");var e=r.g.document;if(!t&&e&&(e.currentScript&&\\"SCRIPT\\"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var o=e.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),r.p=t})(),r.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(r(292),r.b)),console.log(new URL(r(437),r.b)),console.log(new URL(r(740),r.b))})();", } `; @@ -98,11 +98,11 @@ exports[`MinimizerPlugin should not fail when only a js minimizer is set up but exports[`MinimizerPlugin should regenerate hash: assets 1`] = ` Object { - "389.389.28556c474aed5f181e45.js": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", - "AsyncImportExport.d6005d837f80a49afa93.js": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".28556c474aed5f181e45.js\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", - "importExport.99516598f0f48417cbb9.js": "(()=>{\\"use strict\\";function o(){const o=\`baz\${Math.random()}\`;return()=>({a:\\"foobar\\"+o,b:\\"foo\\",baz:o})}console.log(o())})();", - "js.e6d921fb046a3426b75b.js": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.46bcd65d7e1972401425.js": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", + "389.389.__hash4__.js": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", + "AsyncImportExport.__hash3__.js": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".__hash4__.js\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", + "importExport.__hash2__.js": "(()=>{\\"use strict\\";function o(){const o=\`baz\${Math.random()}\`;return()=>({a:\\"foobar\\"+o,b:\\"foo\\",baz:o})}console.log(o())})();", + "js.__hash0__.js": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.__hash1__.js": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", } `; @@ -181,8 +181,8 @@ exports[`MinimizerPlugin should work and do not use memory cache when the "cache exports[`MinimizerPlugin should work and generate real content hash: assets 1`] = ` Object { - "389.28556c474aed5f181e45.a869e6b687b548f37a7a.50b4781c34d1e0f1954b.js": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", - "app.ca592c50a8ef896eea4c.8ac7f02f4c85a917cdba.50b4781c34d1e0f1954b.js": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".28556c474aed5f181e45.a869e6b687b548f37a7a.\\"+n.h()+\\".js\\",n.h=()=>\\"50b4781c34d1e0f1954b\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={524:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", + "389.__hash3__.__hash4__.__hash2__.js": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", + "app.__hash0__.__hash1__.__hash2__.js": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".__hash3__.__hash4__.\\"+n.h()+\\".js\\",n.h=()=>\\"__hash2__\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={524:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", } `; diff --git a/test/__snapshots__/css-minify-option.test.js.snap b/test/__snapshots__/css-minify-option.test.js.snap index c32c5e2d..388e167d 100644 --- a/test/__snapshots__/css-minify-option.test.js.snap +++ b/test/__snapshots__/css-minify-option.test.js.snap @@ -2,10 +2,10 @@ exports[`css minify option should minify js, json, css, and html assets emitted in the same compilation using a single plugin instance: assets 1`] = ` Object { - "1d477fcae4c6c3852830.html": " Hello

Hello, World!

Hello there

", - "60491a50c1e5dd7216b6.json": "{\\"foo\\":\\"bar\\",\\"bar\\":[\\"baz\\"]}", - "cc7dfe1abecefc4bcdf3.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,e,r){\\"use strict\\";t.exports=r.p+\\"cc7dfe1abecefc4bcdf3.css\\"},740(t,e,r){\\"use strict\\";t.exports=r.p+\\"1d477fcae4c6c3852830.html\\"},437(t,e,r){\\"use strict\\";t.exports=r.p+\\"60491a50c1e5dd7216b6.json\\"}},e={};function r(o){var c=e[o];if(void 0!==c)return c.exports;var n=e[o]={exports:{}};return t[o](n,n.exports,r),n.exports}r.m=t,r.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.g.importScripts&&(t=r.g.location+\\"\\");var e=r.g.document;if(!t&&e&&(e.currentScript&&\\"SCRIPT\\"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var o=e.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),r.p=t})(),r.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(r(292),r.b)),console.log(new URL(r(437),r.b)),console.log(new URL(r(740),r.b))})();", + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", + "__hash1__.html": " Hello

Hello, World!

Hello there

", + "__hash2__.json": "{\\"foo\\":\\"bar\\",\\"bar\\":[\\"baz\\"]}", + "main.js": "(()=>{var t={292(t,e,r){\\"use strict\\";t.exports=r.p+\\"__hash0__.css\\"},740(t,e,r){\\"use strict\\";t.exports=r.p+\\"__hash1__.html\\"},437(t,e,r){\\"use strict\\";t.exports=r.p+\\"__hash2__.json\\"}},e={};function r(o){var c=e[o];if(void 0!==c)return c.exports;var n=e[o]={exports:{}};return t[o](n,n.exports,r),n.exports}r.m=t,r.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;r.g.importScripts&&(t=r.g.location+\\"\\");var e=r.g.document;if(!t&&e&&(e.currentScript&&\\"SCRIPT\\"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var o=e.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),r.p=t})(),r.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(r(292),r.b)),console.log(new URL(r(437),r.b)),console.log(new URL(r(740),r.b))})();", } `; @@ -27,8 +27,8 @@ exports[`css minify option should work and merge source maps when \`minify\` is exports[`css minify option should work and merge source maps when \`minify\` is an array of CSS minimizers: assets 1`] = ` Object { - "7ef9f914930a1190260b.css": ".foo{background:blue;color:red}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"7ef9f914930a1190260b.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})(); + "__hash0__.css": ".foo{background:blue;color:red}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})(); //# sourceMappingURL=main.js.map", "main.js.map": "{\\"version\\":3,\\"file\\":\\"main.js\\",\\"mappings\\":\\"gFACAA,EAAA,GAGA,SAAAC,EAAAC,GAEA,IAAAC,EAAAH,EAAAE,GACA,QAAAE,IAAAD,EACA,OAAAA,EAAAE,QAGA,IAAAC,EAAAN,EAAAE,GAAA,CAGAG,QAAA,IAOA,OAHAE,EAAAL,GAAAI,EAAAA,EAAAD,QAAAJ,GAGAK,EAAAD,OACA,CAGAJ,EAAAO,EAAAD,ECzBAN,EAAAQ,EAAA,WACA,oBAAAC,WAAA,OAAAA,WACA,IACA,OAAAC,MAAA,IAAAC,SAAA,gBACA,CAAG,MAAAC,GACH,oBAAAC,OAAA,OAAAA,MACA,CACC,CAPD,GCAAb,EAAAc,EAAA,CAAAC,EAAAC,IAAAC,OAAAC,UAAAC,eAAAC,KAAAL,EAAAC,SCAA,IAAAK,EACArB,EAAAQ,EAAAc,gBAAAD,EAAArB,EAAAQ,EAAAe,SAAA,IACA,IAAAC,EAAAxB,EAAAQ,EAAAgB,SACA,IAAAH,GAAAG,IACAA,EAAAC,eAAA,WAAAD,EAAAC,cAAAC,QAAAC,gBACAN,EAAAG,EAAAC,cAAAG,MACAP,GAAA,CACA,IAAAQ,EAAAL,EAAAM,qBAAA,UACA,GAAAD,EAAAE,OAEA,IADA,IAAAC,EAAAH,EAAAE,OAAA,EACAC,GAAA,KAAAX,IAAA,aAAAY,KAAAZ,KAAAA,EAAAQ,EAAAG,KAAAJ,GAEA,CAIA,IAAAP,EAAA,UAAAa,MAAA,yDACAb,EAAAA,EAAAc,QAAA,aAAAA,QAAA,WAAAA,QAAA,YAAAA,QAAA,iBACAnC,EAAAoC,EAAAf,MClBArB,EAAAqC,EAAA,oBAAAb,UAAAA,SAAAc,SAAAC,KAAAhB,SAAAiB,KCAAC,QAAAC,IAAA,IAAAC,IAAoB3C,EAAA,KAAAA,EAAAqC\\",\\"sources\\":[\\"webpack://minimizer-webpack-plugin/webpack/bootstrap\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/global\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/hasOwnProperty shorthand\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/publicPath\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/jsonp chunk loading\\",\\"webpack://minimizer-webpack-plugin/./test/fixtures/css.js\\"],\\"sourcesContent\\":[\\"// The module cache\\\\nvar __webpack_module_cache__ = {};\\\\n\\\\n// The require function\\\\nfunction __webpack_require__(moduleId) {\\\\n\\\\t// Check if module is in cache\\\\n\\\\tvar cachedModule = __webpack_module_cache__[moduleId];\\\\n\\\\tif (cachedModule !== undefined) {\\\\n\\\\t\\\\treturn cachedModule.exports;\\\\n\\\\t}\\\\n\\\\t// Create a new module (and put it into the cache)\\\\n\\\\tvar module = __webpack_module_cache__[moduleId] = {\\\\n\\\\t\\\\t// no module.id needed\\\\n\\\\t\\\\t// no module.loaded needed\\\\n\\\\t\\\\texports: {}\\\\n\\\\t};\\\\n\\\\n\\\\t// Execute the module function\\\\n\\\\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\\\\n\\\\n\\\\t// Return the exports of the module\\\\n\\\\treturn module.exports;\\\\n}\\\\n\\\\n// expose the modules object (__webpack_modules__)\\\\n__webpack_require__.m = __webpack_modules__;\\\\n\\\\n\\",\\"__webpack_require__.g = (function() {\\\\n\\\\tif (typeof globalThis === 'object') return globalThis;\\\\n\\\\ttry {\\\\n\\\\t\\\\treturn this || new Function('return this')();\\\\n\\\\t} catch (e) {\\\\n\\\\t\\\\tif (typeof window === 'object') return window;\\\\n\\\\t}\\\\n})();\\",\\"__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\\",\\"var scriptUrl;\\\\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \\\\\\"\\\\\\";\\\\nvar document = __webpack_require__.g.document;\\\\nif (!scriptUrl && document) {\\\\n\\\\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\\\\n\\\\t\\\\tscriptUrl = document.currentScript.src;\\\\n\\\\tif (!scriptUrl) {\\\\n\\\\t\\\\tvar scripts = document.getElementsByTagName(\\\\\\"script\\\\\\");\\\\n\\\\t\\\\tif(scripts.length) {\\\\n\\\\t\\\\t\\\\tvar i = scripts.length - 1;\\\\n\\\\t\\\\t\\\\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n}\\\\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\\\\n// or pass an empty string (\\\\\\"\\\\\\") and set the __webpack_public_path__ variable from your code to use your own logic.\\\\nif (!scriptUrl) throw new Error(\\\\\\"Automatic publicPath is not supported in this browser\\\\\\");\\\\nscriptUrl = scriptUrl.replace(/^blob:/, \\\\\\"\\\\\\").replace(/#.*$/, \\\\\\"\\\\\\").replace(/\\\\\\\\?.*$/, \\\\\\"\\\\\\").replace(/\\\\\\\\/[^\\\\\\\\/]+$/, \\\\\\"/\\\\\\");\\\\n__webpack_require__.p = scriptUrl;\\",\\"__webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;\\\\n\\\\n// object to store loaded and loading chunks\\\\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\\\\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\\\\nvar installedChunks = {\\\\n\\\\t792: 0\\\\n};\\\\n\\\\n// no chunk on demand loading\\\\n\\\\n// no prefetching\\\\n\\\\n// no preloaded\\\\n\\\\n// no HMR\\\\n\\\\n// no HMR manifest\\\\n\\\\n// no on chunks loaded\\\\n\\\\n// no jsonp function\\",\\"console.log(new URL(\\\\\\"./file.css\\\\\\", import.meta.url));\\\\n\\"],\\"names\\":[\\"__webpack_module_cache__\\",\\"__webpack_require__\\",\\"moduleId\\",\\"cachedModule\\",\\"undefined\\",\\"exports\\",\\"module\\",\\"__webpack_modules__\\",\\"m\\",\\"g\\",\\"globalThis\\",\\"this\\",\\"Function\\",\\"e\\",\\"window\\",\\"o\\",\\"obj\\",\\"prop\\",\\"Object\\",\\"prototype\\",\\"hasOwnProperty\\",\\"call\\",\\"scriptUrl\\",\\"importScripts\\",\\"location\\",\\"document\\",\\"currentScript\\",\\"tagName\\",\\"toUpperCase\\",\\"src\\",\\"scripts\\",\\"getElementsByTagName\\",\\"length\\",\\"i\\",\\"test\\",\\"Error\\",\\"replace\\",\\"p\\",\\"b\\",\\"baseURI\\",\\"self\\",\\"href\\",\\"console\\",\\"log\\",\\"URL\\"],\\"sourceRoot\\":\\"\\"}", } @@ -77,9 +77,9 @@ exports[`css minify option should work and merge source maps when \`minify\` mix exports[`css minify option should work and merge source maps when \`minify\` mixes CSS minimizers using \`cssnano\`, \`csso\`, \`cleanCss\`, \`lightningCss\`, \`swcCss\`, and \`esbuild\`: assets 1`] = ` Object { - "2b2163fccc87d86ff5f6.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px} + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px} ", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"2b2163fccc87d86ff5f6.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})(); + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})(); //# sourceMappingURL=main.js.map", "main.js.map": "{\\"version\\":3,\\"file\\":\\"main.js\\",\\"mappings\\":\\"gFACAA,EAAA,GAGA,SAAAC,EAAAC,GAEA,IAAAC,EAAAH,EAAAE,GACA,QAAAE,IAAAD,EACA,OAAAA,EAAAE,QAGA,IAAAC,EAAAN,EAAAE,GAAA,CAGAG,QAAA,IAOA,OAHAE,EAAAL,GAAAI,EAAAA,EAAAD,QAAAJ,GAGAK,EAAAD,OACA,CAGAJ,EAAAO,EAAAD,ECzBAN,EAAAQ,EAAA,WACA,oBAAAC,WAAA,OAAAA,WACA,IACA,OAAAC,MAAA,IAAAC,SAAA,gBACA,CAAG,MAAAC,GACH,oBAAAC,OAAA,OAAAA,MACA,CACC,CAPD,GCAAb,EAAAc,EAAA,CAAAC,EAAAC,IAAAC,OAAAC,UAAAC,eAAAC,KAAAL,EAAAC,SCAA,IAAAK,EACArB,EAAAQ,EAAAc,gBAAAD,EAAArB,EAAAQ,EAAAe,SAAA,IACA,IAAAC,EAAAxB,EAAAQ,EAAAgB,SACA,IAAAH,GAAAG,IACAA,EAAAC,eAAA,WAAAD,EAAAC,cAAAC,QAAAC,gBACAN,EAAAG,EAAAC,cAAAG,MACAP,GAAA,CACA,IAAAQ,EAAAL,EAAAM,qBAAA,UACA,GAAAD,EAAAE,OAEA,IADA,IAAAC,EAAAH,EAAAE,OAAA,EACAC,GAAA,KAAAX,IAAA,aAAAY,KAAAZ,KAAAA,EAAAQ,EAAAG,KAAAJ,GAEA,CAIA,IAAAP,EAAA,UAAAa,MAAA,yDACAb,EAAAA,EAAAc,QAAA,aAAAA,QAAA,WAAAA,QAAA,YAAAA,QAAA,iBACAnC,EAAAoC,EAAAf,MClBArB,EAAAqC,EAAA,oBAAAb,UAAAA,SAAAc,SAAAC,KAAAhB,SAAAiB,KCAAC,QAAAC,IAAA,IAAAC,IAAoB3C,EAAA,KAAAA,EAAAqC\\",\\"sources\\":[\\"webpack://minimizer-webpack-plugin/webpack/bootstrap\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/global\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/hasOwnProperty shorthand\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/publicPath\\",\\"webpack://minimizer-webpack-plugin/webpack/runtime/jsonp chunk loading\\",\\"webpack://minimizer-webpack-plugin/./test/fixtures/css.js\\"],\\"sourcesContent\\":[\\"// The module cache\\\\nvar __webpack_module_cache__ = {};\\\\n\\\\n// The require function\\\\nfunction __webpack_require__(moduleId) {\\\\n\\\\t// Check if module is in cache\\\\n\\\\tvar cachedModule = __webpack_module_cache__[moduleId];\\\\n\\\\tif (cachedModule !== undefined) {\\\\n\\\\t\\\\treturn cachedModule.exports;\\\\n\\\\t}\\\\n\\\\t// Create a new module (and put it into the cache)\\\\n\\\\tvar module = __webpack_module_cache__[moduleId] = {\\\\n\\\\t\\\\t// no module.id needed\\\\n\\\\t\\\\t// no module.loaded needed\\\\n\\\\t\\\\texports: {}\\\\n\\\\t};\\\\n\\\\n\\\\t// Execute the module function\\\\n\\\\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\\\\n\\\\n\\\\t// Return the exports of the module\\\\n\\\\treturn module.exports;\\\\n}\\\\n\\\\n// expose the modules object (__webpack_modules__)\\\\n__webpack_require__.m = __webpack_modules__;\\\\n\\\\n\\",\\"__webpack_require__.g = (function() {\\\\n\\\\tif (typeof globalThis === 'object') return globalThis;\\\\n\\\\ttry {\\\\n\\\\t\\\\treturn this || new Function('return this')();\\\\n\\\\t} catch (e) {\\\\n\\\\t\\\\tif (typeof window === 'object') return window;\\\\n\\\\t}\\\\n})();\\",\\"__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\\",\\"var scriptUrl;\\\\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \\\\\\"\\\\\\";\\\\nvar document = __webpack_require__.g.document;\\\\nif (!scriptUrl && document) {\\\\n\\\\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\\\\n\\\\t\\\\tscriptUrl = document.currentScript.src;\\\\n\\\\tif (!scriptUrl) {\\\\n\\\\t\\\\tvar scripts = document.getElementsByTagName(\\\\\\"script\\\\\\");\\\\n\\\\t\\\\tif(scripts.length) {\\\\n\\\\t\\\\t\\\\tvar i = scripts.length - 1;\\\\n\\\\t\\\\t\\\\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\\\\n\\\\t\\\\t}\\\\n\\\\t}\\\\n}\\\\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\\\\n// or pass an empty string (\\\\\\"\\\\\\") and set the __webpack_public_path__ variable from your code to use your own logic.\\\\nif (!scriptUrl) throw new Error(\\\\\\"Automatic publicPath is not supported in this browser\\\\\\");\\\\nscriptUrl = scriptUrl.replace(/^blob:/, \\\\\\"\\\\\\").replace(/#.*$/, \\\\\\"\\\\\\").replace(/\\\\\\\\?.*$/, \\\\\\"\\\\\\").replace(/\\\\\\\\/[^\\\\\\\\/]+$/, \\\\\\"/\\\\\\");\\\\n__webpack_require__.p = scriptUrl;\\",\\"__webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;\\\\n\\\\n// object to store loaded and loading chunks\\\\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\\\\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\\\\nvar installedChunks = {\\\\n\\\\t792: 0\\\\n};\\\\n\\\\n// no chunk on demand loading\\\\n\\\\n// no prefetching\\\\n\\\\n// no preloaded\\\\n\\\\n// no HMR\\\\n\\\\n// no HMR manifest\\\\n\\\\n// no on chunks loaded\\\\n\\\\n// no jsonp function\\",\\"console.log(new URL(\\\\\\"./file.css\\\\\\", import.meta.url));\\\\n\\"],\\"names\\":[\\"__webpack_module_cache__\\",\\"__webpack_require__\\",\\"moduleId\\",\\"cachedModule\\",\\"undefined\\",\\"exports\\",\\"module\\",\\"__webpack_modules__\\",\\"m\\",\\"g\\",\\"globalThis\\",\\"this\\",\\"Function\\",\\"e\\",\\"window\\",\\"o\\",\\"obj\\",\\"prop\\",\\"Object\\",\\"prototype\\",\\"hasOwnProperty\\",\\"call\\",\\"scriptUrl\\",\\"importScripts\\",\\"location\\",\\"document\\",\\"currentScript\\",\\"tagName\\",\\"toUpperCase\\",\\"src\\",\\"scripts\\",\\"getElementsByTagName\\",\\"length\\",\\"i\\",\\"test\\",\\"Error\\",\\"replace\\",\\"p\\",\\"b\\",\\"baseURI\\",\\"self\\",\\"href\\",\\"console\\",\\"log\\",\\"URL\\"],\\"sourceRoot\\":\\"\\"}", } @@ -91,7 +91,7 @@ exports[`css minify option should work and merge source maps when \`minify\` mix exports[`css minify option should work using when the \`minify\` option is \`cleanCssMinify\` and allows to set \`clean-css\` options: assets 1`] = ` Object { - "df0abcfd01b221ee7650.css": ".foo { + "__hash0__.css": ".foo { color: red; background: #00f } @@ -99,7 +99,7 @@ Object { margin: 10px; padding: 10px }", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"df0abcfd01b221ee7650.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -109,8 +109,8 @@ exports[`css minify option should work using when the \`minify\` option is \`cle exports[`css minify option should work using when the \`minify\` option is \`cleanCssMinify\`: assets 1`] = ` Object { - "cc7dfe1abecefc4bcdf3.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"cc7dfe1abecefc4bcdf3.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -120,8 +120,8 @@ exports[`css minify option should work using when the \`minify\` option is \`cle exports[`css minify option should work using when the \`minify\` option is \`cssnanoMinify\` and allows to set \`cssnano\` options: assets 1`] = ` Object { - "9152d518bf323f1bf372.css": "/* a comment */.foo{background:blue;color:red}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"9152d518bf323f1bf372.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": "/* a comment */.foo{background:blue;color:red}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -131,8 +131,8 @@ exports[`css minify option should work using when the \`minify\` option is \`css exports[`css minify option should work using when the \`minify\` option is \`cssnanoMinify\`: assets 1`] = ` Object { - "7ef9f914930a1190260b.css": ".foo{background:blue;color:red}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"7ef9f914930a1190260b.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{background:blue;color:red}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -142,8 +142,8 @@ exports[`css minify option should work using when the \`minify\` option is \`css exports[`css minify option should work using when the \`minify\` option is \`cssoMinify\` and allows to set \`csso\` options: assets 1`] = ` Object { - "cc7dfe1abecefc4bcdf3.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"cc7dfe1abecefc4bcdf3.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -153,8 +153,8 @@ exports[`css minify option should work using when the \`minify\` option is \`css exports[`css minify option should work using when the \`minify\` option is \`cssoMinify\`: assets 1`] = ` Object { - "cc7dfe1abecefc4bcdf3.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"cc7dfe1abecefc4bcdf3.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -164,9 +164,9 @@ exports[`css minify option should work using when the \`minify\` option is \`css exports[`css minify option should work using when the \`minify\` option is \`esbuildMinifyCss\`: assets 1`] = ` Object { - "2b2163fccc87d86ff5f6.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px} + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px} ", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"2b2163fccc87d86ff5f6.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -176,8 +176,8 @@ exports[`css minify option should work using when the \`minify\` option is \`esb exports[`css minify option should work using when the \`minify\` option is \`lightningCssMinify\`: assets 1`] = ` Object { - "cc7dfe1abecefc4bcdf3.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"cc7dfe1abecefc4bcdf3.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{color:red;background:#00f}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -187,8 +187,8 @@ exports[`css minify option should work using when the \`minify\` option is \`lig exports[`css minify option should work using when the \`minify\` option is \`swcMinifyCss\`: assets 1`] = ` Object { - "2585307f0e0d746d71cf.css": ".foo{color:red;background:blue}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"2585307f0e0d746d71cf.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{color:red;background:blue}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; @@ -198,8 +198,8 @@ exports[`css minify option should work using when the \`minify\` option is \`swc exports[`css minify option should work when \`minify\` is an array of functions using \`cssnanoMinify\`: assets 1`] = ` Object { - "7ef9f914930a1190260b.css": ".foo{background:blue;color:red}.bar{margin:10px;padding:10px}", - "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"7ef9f914930a1190260b.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", + "__hash0__.css": ".foo{background:blue;color:red}.bar{margin:10px;padding:10px}", + "main.js": "(()=>{var t={292(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.css\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(292),e.b))})();", } `; diff --git a/test/__snapshots__/extractComments-option.test.js.snap b/test/__snapshots__/extractComments-option.test.js.snap index d625b1eb..b31b06db 100644 --- a/test/__snapshots__/extractComments-option.test.js.snap +++ b/test/__snapshots__/extractComments-option.test.js.snap @@ -4570,10 +4570,10 @@ exports[`extractComments option should match snapshot for a "function" value: wa exports[`extractComments option should match snapshot for comment file when filename is nested: assets 1`] = ` Object { - "nested/directory/203.js?8b9fb1bc4018f0140058": "/*! For license information please see ../../one.js */ + "nested/directory/203.js?__hash1__": "/*! For license information please see ../../one.js */ (self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[203],{203(e){e.exports=Math.random()}}]);", - "nested/directory/one.js?4304086627154611c3fd": "/*! For license information please see ../../one.js */ -(()=>{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"nested/directory/\\"+e+\\".js?8b9fb1bc4018f0140058\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"nested/directory/\\"+e+\\".js?__hash1__\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var r={250(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(250)})();", - "filename/one.js.LICENSE.txt?4aff53a5453ea7edd648": "/*! Legal Comment */ + "filename/one.js.LICENSE.txt?__hash0__": "/*! Legal Comment */ /*! Legal Foo */ @@ -5560,9 +5560,9 @@ Object { // @lic ", - "filename/one.js?4aff53a5453ea7edd648": "/*! For license information please see one.js.LICENSE.txt?4aff53a5453ea7edd648 */ -(()=>{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"chunks/\\"+e+\\".\\"+e+\\".js?8b9fb1bc4018f0140058\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"chunks/\\"+e+\\".\\"+e+\\".js?__hash1__\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var r={35(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(35)})();", - "filename/two.js.LICENSE.txt?41945d353512df22e788": "/** + "filename/two.js.LICENSE.txt?__hash2__": "/** * Information. * @license MIT */ ", - "filename/two.js?41945d353512df22e788": "/*! For license information please see two.js.LICENSE.txt?41945d353512df22e788 */ + "filename/two.js?__hash2__": "/*! For license information please see two.js.LICENSE.txt?__hash2__ */ (()=>{var r={12(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(12)})();", } `; @@ -5594,14 +5594,14 @@ Object { /** @license Copyright 2112 Moon. **/ ", - "chunks/203.203.js?8b9fb1bc4018f0140058": "/*! License information can be found in chunks/203.203.js.LICENSE.txt?query=&filebase=203.203.js */ + "chunks/203.203.js?__hash1__": "/*! License information can be found in chunks/203.203.js.LICENSE.txt?query=&filebase=203.203.js */ (self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[203],{203(e){e.exports=Math.random()}}]);", "filename/four.js.LICENSE.txt?query=&filebase=four.js": "/** * Duplicate comment in difference files. * @license MIT */ ", - "filename/four.js?0c2215c34600f4968cf1": "/*! License information can be found in filename/four.js.LICENSE.txt?query=&filebase=four.js */ + "filename/four.js?__hash4__": "/*! License information can be found in filename/four.js.LICENSE.txt?query=&filebase=four.js */ (()=>{var r={250(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(250)})();", "filename/one.js.LICENSE.txt?query=&filebase=one.js": "/*! Legal Comment */ @@ -5621,8 +5621,8 @@ Object { // @lic ", - "filename/one.js?4aff53a5453ea7edd648": "/*! License information can be found in filename/one.js.LICENSE.txt?query=&filebase=one.js */ -(()=>{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"chunks/\\"+e+\\".\\"+e+\\".js?8b9fb1bc4018f0140058\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"chunks/\\"+e+\\".\\"+e+\\".js?__hash1__\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var r={35(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(35)})();", "filename/two.js.LICENSE.txt?query=&filebase=two.js": "/** * Information. * @license MIT */ ", - "filename/two.js?41945d353512df22e788": "/*! License information can be found in filename/two.js.LICENSE.txt?query=&filebase=two.js */ + "filename/two.js?__hash2__": "/*! License information can be found in filename/two.js.LICENSE.txt?query=&filebase=two.js */ (()=>{var r={12(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(12)})();", } `; @@ -5655,14 +5655,14 @@ Object { /** @license Copyright 2112 Moon. **/ ", - "chunks/203.203.js?8b9fb1bc4018f0140058": "/*! For license information please see 203.203.js.LICENSE.txt */ + "chunks/203.203.js?__hash1__": "/*! For license information please see 203.203.js.LICENSE.txt */ (self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[203],{203(e){e.exports=Math.random()}}]);", "filename/four.js.LICENSE.txt": "/** * Duplicate comment in difference files. * @license MIT */ ", - "filename/four.js?0c2215c34600f4968cf1": "/*! For license information please see four.js.LICENSE.txt */ + "filename/four.js?__hash4__": "/*! For license information please see four.js.LICENSE.txt */ (()=>{var r={250(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(250)})();", "filename/one.js.LICENSE.txt": "/*! Legal Comment */ @@ -5682,8 +5682,8 @@ Object { // @lic ", - "filename/one.js?4aff53a5453ea7edd648": "/*! For license information please see one.js.LICENSE.txt */ -(()=>{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"chunks/\\"+e+\\".\\"+e+\\".js?8b9fb1bc4018f0140058\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var e,t,r,o,n={855(e,t,r){r.e(203).then(r.t.bind(r,203,23)),e.exports=Math.random()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if(\\"object\\"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&\\"function\\"==typeof r.then)return r}var n=Object.create(null);a.r(n);var i={};e=e||[null,t({}),t([]),t(t)];for(var c=2&o&&r;(\\"object\\"==typeof c||\\"function\\"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,a.d(n,i),n},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>\\"chunks/\\"+e+\\".\\"+e+\\".js?__hash1__\\",a.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o=\\"minimizer-webpack-plugin:\\",a.l=(e,t,n,i)=>{if(r[e])r[e].push(t);else{var c,u;if(void 0!==n)for(var l=document.getElementsByTagName(\\"script\\"),p=0;p{c.onerror=c.onload=null,clearTimeout(d);var n=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),n&&n.forEach(e=>e(o)),t)return t(o)},d=setTimeout(s.bind(null,void 0,{type:\\"timeout\\",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),u&&document.head.appendChild(c)}},a.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+\\"\\");var t=a.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName(\\"script\\");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),a.p=e+\\"../\\"})(),(()=>{var e={101:0};a.f.j=(t,r)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise((r,n)=>o=e[t]=[r,n]);r.push(o[2]=n);var i=a.p+a.u(t),c=new Error;a.l(i,r=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&(\\"load\\"===r.type?\\"missing\\":r.type),i=r&&r.target&&r.target.src;c.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+n+\\": \\"+i+\\")\\",c.name=\\"ChunkLoadError\\",c.type=n,c.request=i,o[1](c)}},\\"chunk-\\"+t,t)}};var t=(t,r)=>{var o,n,[i,c,u]=r,l=0;if(i.some(t=>0!==e[t])){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(u)u(a)}for(t&&t(r);l{var r={35(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(35)})();", "filename/two.js.LICENSE.txt": "/** * Information. * @license MIT */ ", - "filename/two.js?41945d353512df22e788": "/*! For license information please see two.js.LICENSE.txt */ + "filename/two.js?__hash2__": "/*! For license information please see two.js.LICENSE.txt */ (()=>{var r={12(r){r.exports=Math.random()}},t={};(function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports})(12)})();", } `; diff --git a/test/__snapshots__/minify-option.test.js.snap b/test/__snapshots__/minify-option.test.js.snap index 8758a08c..da768fec 100644 --- a/test/__snapshots__/minify-option.test.js.snap +++ b/test/__snapshots__/minify-option.test.js.snap @@ -305,7 +305,7 @@ exports[`minify option should work using when the \`minify\` option is \`esbuild exports[`minify option should work using when the \`minify\` option is \`htmlMinifierTerser\` and allows to set \`html-minifier-terser\` options: assets 1`] = ` Object { - "d7a05bcd54a33a5a2432.html": " + "__hash0__.html": " @@ -318,7 +318,7 @@ Object { ", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"d7a05bcd54a33a5a2432.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -328,8 +328,8 @@ exports[`minify option should work using when the \`minify\` option is \`htmlMin exports[`minify option should work using when the \`minify\` option is \`htmlMinifierTerser\` and the "parallel" option is "false": assets 1`] = ` Object { - "1d477fcae4c6c3852830.html": " Hello

Hello, World!

Hello there

", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"1d477fcae4c6c3852830.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": " Hello

Hello, World!

Hello there

", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -339,8 +339,8 @@ exports[`minify option should work using when the \`minify\` option is \`htmlMin exports[`minify option should work using when the \`minify\` option is \`htmlMinifierTerser\` and the "parallel" option is "true": assets 1`] = ` Object { - "1d477fcae4c6c3852830.html": " Hello

Hello, World!

Hello there

", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"1d477fcae4c6c3852830.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": " Hello

Hello, World!

Hello there

", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -350,8 +350,8 @@ exports[`minify option should work using when the \`minify\` option is \`htmlMin exports[`minify option should work using when the \`minify\` option is \`htmlMinifierTerser\`: assets 1`] = ` Object { - "1d477fcae4c6c3852830.html": " Hello

Hello, World!

Hello there

", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"1d477fcae4c6c3852830.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": " Hello

Hello, World!

Hello there

", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -361,13 +361,13 @@ exports[`minify option should work using when the \`minify\` option is \`htmlMin exports[`minify option should work using when the \`minify\` option is \`jsonMinify\` and allows to set \`JSON.stringify\` options: assets 1`] = ` Object { - "71be2c5d019f14d29bdd.json": "{ + "__hash0__.json": "{ \\"foo\\": \\"bar\\", \\"bar\\": [ \\"baz\\" ] }", - "main.js": "(()=>{var t={437(t,r,e){\\"use strict\\";t.exports=e.p+\\"71be2c5d019f14d29bdd.json\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(437),e.b))})();", + "main.js": "(()=>{var t={437(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.json\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(437),e.b))})();", } `; @@ -379,8 +379,8 @@ exports[`minify option should work using when the \`minify\` option is \`jsonMin exports[`minify option should work using when the \`minify\` option is \`jsonMinify\`: assets 1`] = ` Object { - "60491a50c1e5dd7216b6.json": "{\\"foo\\":\\"bar\\",\\"bar\\":[\\"baz\\"]}", - "main.js": "(()=>{var t={437(t,r,e){\\"use strict\\";t.exports=e.p+\\"60491a50c1e5dd7216b6.json\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(437),e.b))})();", + "__hash0__.json": "{\\"foo\\":\\"bar\\",\\"bar\\":[\\"baz\\"]}", + "main.js": "(()=>{var t={437(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.json\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(437),e.b))})();", } `; @@ -390,8 +390,8 @@ exports[`minify option should work using when the \`minify\` option is \`jsonMin exports[`minify option should work using when the \`minify\` option is \`minifyHtmlNode\` and allows to set \`@minify-html/node\` options: assets 1`] = ` Object { - "a8b98e927f5dd7bf3b5c.html": "Hello

Hello, World!

Hello there", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"a8b98e927f5dd7bf3b5c.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": "Hello

Hello, World!

Hello there", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -401,8 +401,8 @@ exports[`minify option should work using when the \`minify\` option is \`minifyH exports[`minify option should work using when the \`minify\` option is \`minifyHtmlNode\`: assets 1`] = ` Object { - "c0d53eff977a795a2b19.html": "Hello

Hello, World!

Hello there", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"c0d53eff977a795a2b19.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": "Hello

Hello, World!

Hello there", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -689,46 +689,6 @@ exports[`minify option should work using when the \`minify\` option is \`swcMini exports[`minify option should work using when the \`minify\` option is \`swcMinify\`: warnings 1`] = `Array []`; -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtml\` and allows to set \`@swc/html\` options: assets 1`] = ` -Object { - "9dc9caae68393b2c00dd.html": "Hello -

Hello, World!

-

Hello there ", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"9dc9caae68393b2c00dd.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", -} -`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtml\` and allows to set \`@swc/html\` options: errors 1`] = `Array []`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtml\` and allows to set \`@swc/html\` options: warnings 1`] = `Array []`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtml\`: assets 1`] = ` -Object { - "4896dc2c417b8ac64625.html": "Hello

Hello, World!

-

Hello there ", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"4896dc2c417b8ac64625.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", -} -`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtml\`: errors 1`] = `Array []`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtml\`: warnings 1`] = `Array []`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtmlFragment\`: assets 1`] = ` -Object { - "55d2d4d24958302dc10d.html": "

- -

hello

-
-", - "main.js": "(()=>{var t={806(t,r,e){\\"use strict\\";t.exports=e.p+\\"55d2d4d24958302dc10d.html\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(806),e.b))})();", -} -`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtmlFragment\`: errors 1`] = `Array []`; - -exports[`minify option should work using when the \`minify\` option is \`swcMinifyHtmlFragment\`: warnings 1`] = `Array []`; - exports[`minify option should work using when the \`minify\` option is \`terserMinify\` and ECMA modules output: assets 1`] = ` Object { "main.js": "var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)},o={};e.d(o,{A:()=>r});function t(){console.log(11)}t();const r=t,n=o.A;export{n as default};", @@ -990,8 +950,8 @@ exports[`minify option should work when \`minify\` and \`terserOptions\` are bot exports[`minify option should work when \`minify\` is an array of functions and dispatches by \`filter\`: assets 1`] = ` Object { - "1d477fcae4c6c3852830.html": " Hello

Hello, World!

Hello there

", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"1d477fcae4c6c3852830.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": " Hello

Hello, World!

Hello there

", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; @@ -1001,8 +961,8 @@ exports[`minify option should work when \`minify\` is an array of functions and exports[`minify option should work when \`minify\` is an array of functions using \`htmlMinifierTerser\`: assets 1`] = ` Object { - "1d477fcae4c6c3852830.html": " Hello

Hello, World!

Hello there

", - "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"1d477fcae4c6c3852830.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", + "__hash0__.html": " Hello

Hello, World!

Hello there

", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", } `; diff --git a/test/__snapshots__/swc-html-minify-option.test.js.snap b/test/__snapshots__/swc-html-minify-option.test.js.snap new file mode 100644 index 00000000..abed2cc5 --- /dev/null +++ b/test/__snapshots__/swc-html-minify-option.test.js.snap @@ -0,0 +1,41 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtml\` and allows to set \`@swc/html\` options: assets 1`] = ` +Object { + "__hash0__.html": "Hello +

Hello, World!

+

Hello there ", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", +} +`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtml\` and allows to set \`@swc/html\` options: errors 1`] = `Array []`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtml\` and allows to set \`@swc/html\` options: warnings 1`] = `Array []`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtml\`: assets 1`] = ` +Object { + "__hash0__.html": "Hello

Hello, World!

+

Hello there ", + "main.js": "(()=>{var t={740(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var n=r[o];if(void 0!==n)return n.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,e),c.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var n=o.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=o[n--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(740),e.b))})();", +} +`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtml\`: errors 1`] = `Array []`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtml\`: warnings 1`] = `Array []`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtmlFragment\`: assets 1`] = ` +Object { + "__hash0__.html": "

+ +

hello

+
+", + "main.js": "(()=>{var t={806(t,r,e){\\"use strict\\";t.exports=e.p+\\"__hash0__.html\\"}},r={};function e(o){var c=r[o];if(void 0!==c)return c.exports;var n=r[o]={exports:{}};return t[o](n,n.exports,e),n.exports}e.m=t,e.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(t){if(\\"object\\"==typeof window)return window}}(),e.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),(()=>{var t;e.g.importScripts&&(t=e.g.location+\\"\\");var r=e.g.document;if(!t&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var o=r.getElementsByTagName(\\"script\\");if(o.length)for(var c=o.length-1;c>-1&&(!t||!/^http(s?):/.test(t));)t=o[c--].src}if(!t)throw new Error(\\"Automatic publicPath is not supported in this browser\\");t=t.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),e.p=t})(),e.b=\\"undefined\\"!=typeof document&&document.baseURI||self.location.href,console.log(new URL(e(806),e.b))})();", +} +`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtmlFragment\`: errors 1`] = `Array []`; + +exports[`swc html minify option should work using when the \`minify\` option is \`swcMinifyHtmlFragment\`: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/test-option.test.js.snap b/test/__snapshots__/test-option.test.js.snap index d8983e3a..1184adfe 100644 --- a/test/__snapshots__/test-option.test.js.snap +++ b/test/__snapshots__/test-option.test.js.snap @@ -2,11 +2,11 @@ exports[`test option should match snapshot and uglify "mjs": assets 1`] = ` Object { - "389.389.mjs?ver=3e11fb5964258488589e": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", - "AsyncImportExport.mjs?var=3e11fb5964258488589e": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".mjs?ver=\\"+n.h(),n.h=()=>\\"3e11fb5964258488589e\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", - "importExport.mjs?var=3e11fb5964258488589e": "(()=>{\\"use strict\\";function o(){const o=\`baz\${Math.random()}\`;return()=>({a:\\"foobar\\"+o,b:\\"foo\\",baz:o})}console.log(o())})();", - "js.mjs?var=3e11fb5964258488589e": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.mjs?var=3e11fb5964258488589e": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", + "389.389.mjs?ver=__hash0__": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", + "AsyncImportExport.mjs?var=__hash0__": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".mjs?ver=\\"+n.h(),n.h=()=>\\"__hash0__\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", + "importExport.mjs?var=__hash0__": "(()=>{\\"use strict\\";function o(){const o=\`baz\${Math.random()}\`;return()=>({a:\\"foobar\\"+o,b:\\"foo\\",baz:o})}console.log(o())})();", + "js.mjs?var=__hash0__": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.mjs?var=__hash0__": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", } `; @@ -16,7 +16,7 @@ exports[`test option should match snapshot and uglify "mjs": warnings 1`] = `Arr exports[`test option should match snapshot for a single "test" value ({String}): assets 1`] = ` Object { - "389.389.js?ver=c092365f2f76f4f956c1": "\\"use strict\\"; + "389.389.js?ver=__hash0__": "\\"use strict\\"; (self[\\"webpackChunkminimizer_webpack_plugin\\"] = self[\\"webpackChunkminimizer_webpack_plugin\\"] || []).push([[389],{ /***/ 389 @@ -32,7 +32,7 @@ __webpack_require__.r(__webpack_exports__); /***/ } }]);", - "AsyncImportExport.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "AsyncImportExport.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; /******/ var __webpack_modules__ = ({}); /************************************************************************/ @@ -100,7 +100,7 @@ __webpack_require__.r(__webpack_exports__); /******/ /******/ /* webpack/runtime/getFullHash */ /******/ (() => { -/******/ __webpack_require__.h = () => (\\"c092365f2f76f4f956c1\\") +/******/ __webpack_require__.h = () => (\\"__hash0__\\") /******/ })(); /******/ /******/ /* webpack/runtime/global */ @@ -299,7 +299,7 @@ __webpack_require__.e(/* import() */ 389).then(__webpack_require__.bind(__webpac /******/ })() ;", - "importExport.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "importExport.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; // UNUSED EXPORTS: default @@ -329,8 +329,8 @@ console.log(Foo()); /******/ })() ;", - "js.js?var=c092365f2f76f4f956c1": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "js.js?var=__hash0__": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; // foo // bar @@ -356,7 +356,7 @@ exports[`test option should match snapshot for a single "test" value ({String}): exports[`test option should match snapshot for a single \`test\` value ({RegExp}): assets 1`] = ` Object { - "389.389.js?ver=c092365f2f76f4f956c1": "\\"use strict\\"; + "389.389.js?ver=__hash0__": "\\"use strict\\"; (self[\\"webpackChunkminimizer_webpack_plugin\\"] = self[\\"webpackChunkminimizer_webpack_plugin\\"] || []).push([[389],{ /***/ 389 @@ -372,7 +372,7 @@ __webpack_require__.r(__webpack_exports__); /***/ } }]);", - "AsyncImportExport.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "AsyncImportExport.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; /******/ var __webpack_modules__ = ({}); /************************************************************************/ @@ -440,7 +440,7 @@ __webpack_require__.r(__webpack_exports__); /******/ /******/ /* webpack/runtime/getFullHash */ /******/ (() => { -/******/ __webpack_require__.h = () => (\\"c092365f2f76f4f956c1\\") +/******/ __webpack_require__.h = () => (\\"__hash0__\\") /******/ })(); /******/ /******/ /* webpack/runtime/global */ @@ -639,7 +639,7 @@ __webpack_require__.e(/* import() */ 389).then(__webpack_require__.bind(__webpac /******/ })() ;", - "importExport.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "importExport.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; // UNUSED EXPORTS: default @@ -669,8 +669,8 @@ console.log(Foo()); /******/ })() ;", - "js.js?var=c092365f2f76f4f956c1": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", + "js.js?var=__hash0__": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.js?var=__hash0__": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", } `; @@ -680,7 +680,7 @@ exports[`test option should match snapshot for a single \`test\` value ({RegExp} exports[`test option should match snapshot for multiple "test" values ({RegExp}): assets 1`] = ` Object { - "389.389.js?ver=c092365f2f76f4f956c1": "\\"use strict\\"; + "389.389.js?ver=__hash0__": "\\"use strict\\"; (self[\\"webpackChunkminimizer_webpack_plugin\\"] = self[\\"webpackChunkminimizer_webpack_plugin\\"] || []).push([[389],{ /***/ 389 @@ -696,8 +696,8 @@ __webpack_require__.r(__webpack_exports__); /***/ } }]);", - "AsyncImportExport.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".js?ver=\\"+n.h(),n.h=()=>\\"c092365f2f76f4f956c1\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", - "importExport.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "AsyncImportExport.js?var=__hash0__": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".js?ver=\\"+n.h(),n.h=()=>\\"__hash0__\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", + "importExport.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; // UNUSED EXPORTS: default @@ -727,8 +727,8 @@ console.log(Foo()); /******/ })() ;", - "js.js?var=c092365f2f76f4f956c1": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", + "js.js?var=__hash0__": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.js?var=__hash0__": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", } `; @@ -738,7 +738,7 @@ exports[`test option should match snapshot for multiple "test" values ({RegExp}) exports[`test option should match snapshot for multiple "test" values ({String}): assets 1`] = ` Object { - "389.389.js?ver=c092365f2f76f4f956c1": "\\"use strict\\"; + "389.389.js?ver=__hash0__": "\\"use strict\\"; (self[\\"webpackChunkminimizer_webpack_plugin\\"] = self[\\"webpackChunkminimizer_webpack_plugin\\"] || []).push([[389],{ /***/ 389 @@ -754,8 +754,8 @@ __webpack_require__.r(__webpack_exports__); /***/ } }]);", - "AsyncImportExport.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".js?ver=\\"+n.h(),n.h=()=>\\"c092365f2f76f4f956c1\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", - "importExport.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "AsyncImportExport.js?var=__hash0__": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".js?ver=\\"+n.h(),n.h=()=>\\"__hash0__\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", + "importExport.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; // UNUSED EXPORTS: default @@ -785,8 +785,8 @@ console.log(Foo()); /******/ })() ;", - "js.js?var=c092365f2f76f4f956c1": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.js?var=c092365f2f76f4f956c1": "/******/ (() => { // webpackBootstrap + "js.js?var=__hash0__": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.js?var=__hash0__": "/******/ (() => { // webpackBootstrap /******/ \\"use strict\\"; // foo // bar @@ -812,11 +812,11 @@ exports[`test option should match snapshot for multiple "test" values ({String}) exports[`test option should match snapshot with empty value: assets 1`] = ` Object { - "389.389.js?ver=c092365f2f76f4f956c1": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", - "AsyncImportExport.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".js?ver=\\"+n.h(),n.h=()=>\\"c092365f2f76f4f956c1\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", - "importExport.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";function o(){const o=\`baz\${Math.random()}\`;return()=>({a:\\"foobar\\"+o,b:\\"foo\\",baz:o})}console.log(o())})();", - "js.js?var=c092365f2f76f4f956c1": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", - "mjs.js?var=c092365f2f76f4f956c1": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", + "389.389.js?ver=__hash0__": "\\"use strict\\";(self.webpackChunkminimizer_webpack_plugin=self.webpackChunkminimizer_webpack_plugin||[]).push([[389],{389(e,i,n){n.r(i),n.d(i,{default:()=>p});const p=\\"async-dep\\"}}]);", + "AsyncImportExport.js?var=__hash0__": "(()=>{\\"use strict\\";var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+\\".\\"+e+\\".js?ver=\\"+n.h(),n.h=()=>\\"__hash0__\\",n.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r=\\"minimizer-webpack-plugin:\\",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,c;if(void 0!==i)for(var u=document.getElementsByTagName(\\"script\\"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(o)),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:\\"timeout\\",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{\\"undefined\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\"Module\\"}),Object.defineProperty(e,\\"__esModule\\",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+\\"\\");var r=n.g.document;if(!e&&r&&(r.currentScript&&\\"SCRIPT\\"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName(\\"script\\");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),n.p=e})(),(()=>{var e={988:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise((t,n)=>o=e[r]=[t,n]);t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&(\\"load\\"===t.type?\\"missing\\":t.type),a=t&&t.target&&t.target.src;l.message=\\"Loading chunk \\"+r+\\" failed.\\\\n(\\"+i+\\": \\"+a+\\")\\",l.name=\\"ChunkLoadError\\",l.type=i,l.request=a,o[1](l)}},\\"chunk-\\"+r,r)}};var r=(r,t)=>{var o,i,[a,l,c]=t,u=0;if(a.some(r=>0!==e[r])){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)c(n)}for(r&&r(t);u{console.log(\\"Good\\")})})();", + "importExport.js?var=__hash0__": "(()=>{\\"use strict\\";function o(){const o=\`baz\${Math.random()}\`;return()=>({a:\\"foobar\\"+o,b:\\"foo\\",baz:o})}console.log(o())})();", + "js.js?var=__hash0__": "(()=>{var r={921(r){r.exports=function(){console.log(7)}}},o={};(function t(e){var n=o[e];if(void 0!==n)return n.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,t),s.exports})(921)})();", + "mjs.js?var=__hash0__": "(()=>{\\"use strict\\";function o(){console.log(11)}o()})();", } `; diff --git a/test/helpers/snapshotHashSerializer.js b/test/helpers/snapshotHashSerializer.js new file mode 100644 index 00000000..e6bd6e67 --- /dev/null +++ b/test/helpers/snapshotHashSerializer.js @@ -0,0 +1,65 @@ +// Webpack bakes content/chunk/full hashes into asset filenames and into the +// runtime chunk-loading code. Those digests are not stable across environments +// — for example, this plugin folds the minimizer (terser) version into the +// chunk hash for cache busting, so a different installed terser changes every +// hash even when the emitted code is byte-for-byte identical. Normalising the +// digests keeps the snapshots focused on the output that actually matters. + +const HASH = /\b[0-9a-f]{20,}\b/g; + +const hasHash = (string) => /\b[0-9a-f]{20,}\b/.test(string); + +// Map each distinct digest to a stable, unique token (by order of first +// appearance, which is deterministic for a given snapshot). Distinct hashes +// therefore never collapse into the same token, so using the result as an +// object key can't silently drop asset entries. +const makeStripper = () => { + const tokens = new Map(); + + return (string) => + string.replace(HASH, (hash) => { + let token = tokens.get(hash); + + if (token === undefined) { + token = `__hash${tokens.size}__`; + tokens.set(hash, token); + } + + return token; + }); +}; + +const isAssetMap = (value) => { + if (value === null || typeof value !== "object" || Array.isArray(value)) { + return false; + } + + const keys = Object.keys(value); + + return ( + keys.length > 0 && + keys.every((key) => typeof value[key] === "string") && + keys.some((key) => hasHash(key) || hasHash(value[key])) + ); +}; + +module.exports = { + test(value) { + return typeof value === "string" ? hasHash(value) : isAssetMap(value); + }, + print(value, printer) { + const strip = makeStripper(); + + if (typeof value === "string") { + return printer(strip(value)); + } + + const normalized = {}; + + for (const key of Object.keys(value)) { + normalized[strip(key)] = strip(value[key]); + } + + return printer(normalized); + }, +}; diff --git a/test/minify-option.test.js b/test/minify-option.test.js index a9f305b9..86294ce7 100644 --- a/test/minify-option.test.js +++ b/test/minify-option.test.js @@ -1175,63 +1175,6 @@ describe("minify option", () => { expect(getWarnings(stats)).toMatchSnapshot("warnings"); }); - it("should work using when the `minify` option is `swcMinifyHtml`", async () => { - const compiler = getCompiler({ - entry: path.resolve(__dirname, "./fixtures/html.js"), - }); - - new MinimizerPlugin().apply(compiler); - new MinimizerPlugin({ - test: /\.html(\?.*)?$/i, - minify: MinimizerPlugin.swcMinifyHtml, - }).apply(compiler); - - const stats = await compile(compiler); - - expect(readsAssets(compiler, stats)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - }); - - it("should work using when the `minify` option is `swcMinifyHtml` and allows to set `@swc/html` options", async () => { - const compiler = getCompiler({ - entry: path.resolve(__dirname, "./fixtures/html.js"), - }); - - new MinimizerPlugin().apply(compiler); - new MinimizerPlugin({ - test: /\.html(\?.*)?$/i, - minify: MinimizerPlugin.swcMinifyHtml, - minimizerOptions: { - removeComments: false, - }, - }).apply(compiler); - - const stats = await compile(compiler); - - expect(readsAssets(compiler, stats)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - }); - - it("should work using when the `minify` option is `swcMinifyHtmlFragment`", async () => { - const compiler = getCompiler({ - entry: path.resolve(__dirname, "./fixtures/html-fragment.js"), - }); - - new MinimizerPlugin().apply(compiler); - new MinimizerPlugin({ - test: /\.html(\?.*)?$/i, - minify: MinimizerPlugin.swcMinifyHtmlFragment, - }).apply(compiler); - - const stats = await compile(compiler); - - expect(readsAssets(compiler, stats)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - }); - it("should work using when the `minify` option is `minifyHtmlNode`", async () => { const compiler = getCompiler({ entry: path.resolve(__dirname, "./fixtures/html.js"), diff --git a/test/swc-html-minify-option.test.js b/test/swc-html-minify-option.test.js new file mode 100644 index 00000000..938df930 --- /dev/null +++ b/test/swc-html-minify-option.test.js @@ -0,0 +1,73 @@ +import path from "path"; + +import MinimizerPlugin from "../src"; + +import { + compile, + getCompiler, + getErrors, + getWarnings, + readsAssets, +} from "./helpers"; + +// `@swc/html` requires Node >= 14, so this file is excluded from +// `testPathIgnorePatterns` in `jest.config.js` on older Node versions. + +describe("swc html minify option", () => { + it("should work using when the `minify` option is `swcMinifyHtml`", async () => { + const compiler = getCompiler({ + entry: path.resolve(__dirname, "./fixtures/html.js"), + }); + + new MinimizerPlugin().apply(compiler); + new MinimizerPlugin({ + test: /\.html(\?.*)?$/i, + minify: MinimizerPlugin.swcMinifyHtml, + }).apply(compiler); + + const stats = await compile(compiler); + + expect(readsAssets(compiler, stats)).toMatchSnapshot("assets"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + }); + + it("should work using when the `minify` option is `swcMinifyHtml` and allows to set `@swc/html` options", async () => { + const compiler = getCompiler({ + entry: path.resolve(__dirname, "./fixtures/html.js"), + }); + + new MinimizerPlugin().apply(compiler); + new MinimizerPlugin({ + test: /\.html(\?.*)?$/i, + minify: MinimizerPlugin.swcMinifyHtml, + minimizerOptions: { + removeComments: false, + }, + }).apply(compiler); + + const stats = await compile(compiler); + + expect(readsAssets(compiler, stats)).toMatchSnapshot("assets"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + }); + + it("should work using when the `minify` option is `swcMinifyHtmlFragment`", async () => { + const compiler = getCompiler({ + entry: path.resolve(__dirname, "./fixtures/html-fragment.js"), + }); + + new MinimizerPlugin().apply(compiler); + new MinimizerPlugin({ + test: /\.html(\?.*)?$/i, + minify: MinimizerPlugin.swcMinifyHtmlFragment, + }).apply(compiler); + + const stats = await compile(compiler); + + expect(readsAssets(compiler, stats)).toMatchSnapshot("assets"); + expect(getErrors(stats)).toMatchSnapshot("errors"); + expect(getWarnings(stats)).toMatchSnapshot("warnings"); + }); +});