diff --git a/common/changes/@rushstack/webpack5-module-minifier-plugin/copilot-webpack-shorthand-support_2026-02-11-23-38.json b/common/changes/@rushstack/webpack5-module-minifier-plugin/copilot-webpack-shorthand-support_2026-02-11-23-38.json new file mode 100644 index 00000000000..adac05ca5e0 --- /dev/null +++ b/common/changes/@rushstack/webpack5-module-minifier-plugin/copilot-webpack-shorthand-support_2026-02-11-23-38.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/webpack5-module-minifier-plugin", + "comment": "Add support for webpack's ECMAScript method shorthand format. The plugin now detects when modules are emitted using method shorthand syntax (without 'function' keyword or arrow syntax) and wraps them appropriately for minification.", + "type": "minor" + } + ], + "packageName": "@rushstack/webpack5-module-minifier-plugin" +} diff --git a/common/reviews/api/webpack5-module-minifier-plugin.api.md b/common/reviews/api/webpack5-module-minifier-plugin.api.md index 825f134b3b6..3d5d843e80f 100644 --- a/common/reviews/api/webpack5-module-minifier-plugin.api.md +++ b/common/reviews/api/webpack5-module-minifier-plugin.api.md @@ -59,6 +59,7 @@ export interface IFactoryMeta { // @public export interface IModuleInfo { id: string | number; + isShorthand?: boolean; module: Module; source: sources.Source; } @@ -110,6 +111,12 @@ export interface IRenderedModulePosition { // @public export const MODULE_WRAPPER_PREFIX: '__MINIFY_MODULE__('; +// @public +export const MODULE_WRAPPER_SHORTHAND_PREFIX: `${typeof MODULE_WRAPPER_PREFIX}{__DEFAULT_ID__`; + +// @public +export const MODULE_WRAPPER_SHORTHAND_SUFFIX: `}${typeof MODULE_WRAPPER_SUFFIX}`; + // @public export const MODULE_WRAPPER_SUFFIX: ');'; diff --git a/webpack/webpack5-module-minifier-plugin/src/Constants.ts b/webpack/webpack5-module-minifier-plugin/src/Constants.ts index ad6ac554e7e..fe3d0eb22dd 100644 --- a/webpack/webpack5-module-minifier-plugin/src/Constants.ts +++ b/webpack/webpack5-module-minifier-plugin/src/Constants.ts @@ -14,6 +14,23 @@ export const MODULE_WRAPPER_PREFIX: '__MINIFY_MODULE__(' = '__MINIFY_MODULE__('; */ export const MODULE_WRAPPER_SUFFIX: ');' = ');'; +/** + * Prefix to wrap ECMAScript method shorthand `(module, __webpack_exports__, __webpack_require__) { ... }` so that the minifier doesn't delete it. + * Used when webpack emits modules using shorthand syntax. + * Combined with the suffix, creates: `__MINIFY_MODULE__({__DEFAULT_ID__(params){body}});` + * Public because alternate Minifier implementations may wish to know about it. + * @public + */ +export const MODULE_WRAPPER_SHORTHAND_PREFIX: `${typeof MODULE_WRAPPER_PREFIX}{__DEFAULT_ID__` = `${MODULE_WRAPPER_PREFIX}{__DEFAULT_ID__`; +/** + * Suffix to wrap ECMAScript method shorthand `(module, __webpack_exports__, __webpack_require__) { ... }` so that the minifier doesn't delete it. + * Used when webpack emits modules using shorthand syntax. + * Combined with the prefix, creates: `__MINIFY_MODULE__({__DEFAULT_ID__(params){body}});` + * Public because alternate Minifier implementations may wish to know about it. + * @public + */ +export const MODULE_WRAPPER_SHORTHAND_SUFFIX: `}${typeof MODULE_WRAPPER_SUFFIX}` = `}${MODULE_WRAPPER_SUFFIX}`; + /** * Token preceding a module id in the emitted asset so the minifier can operate on the Webpack runtime or chunk boilerplate in isolation * @public @@ -22,9 +39,14 @@ export const CHUNK_MODULE_TOKEN: '__WEBPACK_CHUNK_MODULE__' = '__WEBPACK_CHUNK_M /** * RegExp for replacing chunk module placeholders + * Handles three possible representations: + * - `"id":__WEBPACK_CHUNK_MODULE__HASH__` (methodShorthand: false, object) + * - `__WEBPACK_CHUNK_MODULE__HASH__` (array syntax) + * - `"id":__WEBPACK_CHUNK_MODULE__HASH__` with leading ':' (methodShorthand: true, object) + * Captures optional leading `:` to handle shorthand format properly * @public */ -export const CHUNK_MODULE_REGEX: RegExp = /__WEBPACK_CHUNK_MODULE__([A-Za-z0-9$_]+)/g; +export const CHUNK_MODULE_REGEX: RegExp = /(:?)__WEBPACK_CHUNK_MODULE__([A-Za-z0-9$_]+)/g; /** * Stage # to use when this should be the first tap in the hook diff --git a/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.ts b/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.ts index 478e2a42987..b98be12b188 100644 --- a/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.ts +++ b/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.ts @@ -29,6 +29,8 @@ import { CHUNK_MODULE_TOKEN, MODULE_WRAPPER_PREFIX, MODULE_WRAPPER_SUFFIX, + MODULE_WRAPPER_SHORTHAND_PREFIX, + MODULE_WRAPPER_SHORTHAND_SUFFIX, STAGE_BEFORE, STAGE_AFTER } from './Constants'; @@ -74,6 +76,7 @@ interface IOptionsForHash extends Omit interface ISourceCacheEntry { source: sources.Source; hash: string; + isShorthand: boolean; } const compilationMetadataMap: WeakMap = new WeakMap(); @@ -125,6 +128,46 @@ function isLicenseComment(comment: Comment): boolean { return LICENSE_COMMENT_REGEX.test(comment.value); } +/** + * RegExp for detecting function keyword with optional whitespace + */ +const FUNCTION_KEYWORD_REGEX: RegExp = /function\s*\(/; + +/** + * Detects if the module code uses ECMAScript method shorthand format. + * Shorthand format would appear when webpack emits object methods without function keyword + * For example: `id(params) { body }` instead of `id: function(params) { body }` + * + * Following the problem statement's recommendation: inspect the rendered code prior to the first `{` + * and look for either a `=>` or `function(`. If neither are encountered, assume object shorthand format. + * + * @param code - The module source code to check + * @returns true if the code is in method shorthand format + */ +function isMethodShorthandFormat(code: string): boolean { + // Find the position of the first opening brace + const firstBraceIndex: number = code.indexOf('{'); + if (firstBraceIndex < 0) { + // No brace found, not a function format + return false; + } + + // Get the code before the first brace + const beforeBrace: string = code.slice(0, firstBraceIndex); + + // Check if it contains '=>' or 'function(' + // If it does, it's a regular arrow function or function expression, not shorthand + // Use a simple check that handles common whitespace variations + if (beforeBrace.includes('=>') || FUNCTION_KEYWORD_REGEX.test(beforeBrace)) { + return false; + } + + // If neither '=>' nor 'function(' are found, assume object method shorthand format + // ECMAScript method shorthand is used in object literals: { methodName(params){body} } + // Webpack emits this as just (params){body} which only works in the object literal context + return true; +} + /** * Webpack plugin that minifies code on a per-module basis rather than per-asset. The actual minification is handled by the input `minifier` object. * @public @@ -333,12 +376,16 @@ export class ModuleMinifierPlugin implements WebpackPluginInstance { return cachedResult.source; } + // Get the source code to check its format + const sourceCode: string = source.source().toString(); + + // Detect if this is ECMAScript method shorthand format + const isShorthand: boolean = isMethodShorthandFormat(sourceCode); + // If this module is wrapped in a factory, need to add boilerplate so that the minifier keeps the function - const wrapped: sources.Source = new ConcatSource( - MODULE_WRAPPER_PREFIX + '\n', - source, - '\n' + MODULE_WRAPPER_SUFFIX - ); + const wrapped: sources.Source = isShorthand + ? new ConcatSource(MODULE_WRAPPER_SHORTHAND_PREFIX, source, MODULE_WRAPPER_SHORTHAND_SUFFIX) + : new ConcatSource(MODULE_WRAPPER_PREFIX + '\n', source, '\n' + MODULE_WRAPPER_SUFFIX); const nameForMap: string = `(modules)/${id}`; @@ -386,8 +433,18 @@ export class ModuleMinifierPlugin implements WebpackPluginInstance { const len: number = minified.length; // Trim off the boilerplate used to preserve the factory - unwrapped.replace(0, MODULE_WRAPPER_PREFIX.length - 1, ''); - unwrapped.replace(len - MODULE_WRAPPER_SUFFIX.length, len - 1, ''); + // Use different prefix/suffix lengths for shorthand vs regular format + // Capture isShorthand from closure instead of looking it up + if (isShorthand) { + // For shorthand format: __MINIFY_MODULE__({__DEFAULT_ID__(args){...}}); + // Remove prefix and suffix by their lengths + unwrapped.replace(0, MODULE_WRAPPER_SHORTHAND_PREFIX.length - 1, ''); + unwrapped.replace(len - MODULE_WRAPPER_SHORTHAND_SUFFIX.length, len - 1, ''); + } else { + // Regular format: __MINIFY_MODULE__(function(args){...}); or __MINIFY_MODULE__((args)=>{...}); + unwrapped.replace(0, MODULE_WRAPPER_PREFIX.length - 1, ''); + unwrapped.replace(len - MODULE_WRAPPER_SUFFIX.length, len - 1, ''); + } const withIds: sources.Source = postProcessCode(unwrapped, { compilation, @@ -402,7 +459,8 @@ export class ModuleMinifierPlugin implements WebpackPluginInstance { minifiedModules.set(hash, { source: cached, module: mod, - id + id, + isShorthand }); } catch (err) { compilation.errors.push(err); @@ -414,10 +472,15 @@ export class ModuleMinifierPlugin implements WebpackPluginInstance { ); } - const result: sources.Source = new RawSource(`${CHUNK_MODULE_TOKEN}${hash}`); + // Create token with optional ':' prefix for shorthand modules + // For non-shorthand: __WEBPACK_CHUNK_MODULE__hash (becomes "id":__WEBPACK_CHUNK_MODULE__hash in object) + // For shorthand: :__WEBPACK_CHUNK_MODULE__hash (becomes "id"__WEBPACK_CHUNK_MODULE__hash, ':' makes it valid property assignment) + const tokenPrefix: string = isShorthand ? ':' : ''; + const result: sources.Source = new RawSource(`${tokenPrefix}${CHUNK_MODULE_TOKEN}${hash}`); sourceCache.set(source, { hash, - source: result + source: result, + isShorthand }); // Return an expression to replace later diff --git a/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.types.ts b/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.types.ts index 8d6e7de5902..15027e44d29 100644 --- a/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.types.ts +++ b/webpack/webpack5-module-minifier-plugin/src/ModuleMinifierPlugin.types.ts @@ -74,6 +74,11 @@ export interface IModuleInfo { * The id of the module, from the chunk graph. */ id: string | number; + + /** + * Whether this module was in method shorthand format + */ + isShorthand?: boolean; } /** diff --git a/webpack/webpack5-module-minifier-plugin/src/RehydrateAsset.ts b/webpack/webpack5-module-minifier-plugin/src/RehydrateAsset.ts index d72f950bf2e..86a2defa3b2 100644 --- a/webpack/webpack5-module-minifier-plugin/src/RehydrateAsset.ts +++ b/webpack/webpack5-module-minifier-plugin/src/RehydrateAsset.ts @@ -46,7 +46,8 @@ export function rehydrateAsset( // RegExp.exec uses null or an array as the return type, explicitly let match: RegExpExecArray | null = null; while ((match = CHUNK_MODULE_REGEX.exec(assetCode))) { - const hash: string = match[1]; + const leadingColon: string = match[1]; // Captured ':' or empty string + const hash: string = match[2]; // The module hash const moduleSource: IModuleInfo | undefined = moduleMap.get(hash); if (moduleSource === undefined) { @@ -66,6 +67,15 @@ export function rehydrateAsset( lastStart = CHUNK_MODULE_REGEX.lastIndex; if (moduleSource) { + // Check if this module was in shorthand format + const isShorthand: boolean = moduleSource.isShorthand === true; + + // For shorthand format, omit the colon. For regular format, keep it. + if (!isShorthand && leadingColon) { + source.add(leadingColon); + charOffset += leadingColon.length; + } + const charLength: number = moduleSource.source.source().length; if (emitRenderInfo) { @@ -78,6 +88,12 @@ export function rehydrateAsset( source.add(moduleSource.source); charOffset += charLength; } else { + // Keep the colon if present for error module + if (leadingColon) { + source.add(leadingColon); + charOffset += leadingColon.length; + } + const errorModule: string = `()=>{throw new Error(\`Missing module with hash "${hash}"\`)}`; source.add(errorModule); diff --git a/webpack/webpack5-module-minifier-plugin/src/index.ts b/webpack/webpack5-module-minifier-plugin/src/index.ts index 70231dbbe87..ff4ed0fce81 100644 --- a/webpack/webpack5-module-minifier-plugin/src/index.ts +++ b/webpack/webpack5-module-minifier-plugin/src/index.ts @@ -4,6 +4,8 @@ export { MODULE_WRAPPER_PREFIX, MODULE_WRAPPER_SUFFIX, + MODULE_WRAPPER_SHORTHAND_PREFIX, + MODULE_WRAPPER_SHORTHAND_SUFFIX, CHUNK_MODULE_TOKEN, CHUNK_MODULE_REGEX, STAGE_BEFORE, diff --git a/webpack/webpack5-module-minifier-plugin/src/test/MockMinifier.ts b/webpack/webpack5-module-minifier-plugin/src/test/MockMinifier.ts index d5e6ff8fd52..0d4fdc18a1a 100644 --- a/webpack/webpack5-module-minifier-plugin/src/test/MockMinifier.ts +++ b/webpack/webpack5-module-minifier-plugin/src/test/MockMinifier.ts @@ -8,7 +8,12 @@ import type { IMinifierConnection } from '@rushstack/module-minifier'; -import { MODULE_WRAPPER_PREFIX, MODULE_WRAPPER_SUFFIX } from '../Constants'; +import { + MODULE_WRAPPER_PREFIX, + MODULE_WRAPPER_SUFFIX, + MODULE_WRAPPER_SHORTHAND_PREFIX, + MODULE_WRAPPER_SHORTHAND_SUFFIX +} from '../Constants'; export class MockMinifier implements IModuleMinifier { public readonly requests: Map = new Map(); @@ -24,12 +29,31 @@ export class MockMinifier implements IModuleMinifier { this.requests.set(hash, code); const isModule: boolean = code.startsWith(MODULE_WRAPPER_PREFIX); - const processedCode: string = isModule - ? `${MODULE_WRAPPER_PREFIX}\n// Begin Module Hash=${hash}\n${code.slice( + const isShorthandModule: boolean = code.startsWith(MODULE_WRAPPER_SHORTHAND_PREFIX); + + // Use local function to ensure processedCode is always initialized (strictNullChecks compliant) + const getProcessedCode = (): string => { + if (isShorthandModule) { + // Handle shorthand format + // Add comment markers similar to regular format + const innerCode: string = code.slice( + MODULE_WRAPPER_SHORTHAND_PREFIX.length, + -MODULE_WRAPPER_SHORTHAND_SUFFIX.length + ); + return `${MODULE_WRAPPER_SHORTHAND_PREFIX}\n// Begin Module Hash=${hash}\n${innerCode}\n// End Module\n${MODULE_WRAPPER_SHORTHAND_SUFFIX}`; + } else if (isModule) { + // Handle regular format + return `${MODULE_WRAPPER_PREFIX}\n// Begin Module Hash=${hash}\n${code.slice( MODULE_WRAPPER_PREFIX.length, -MODULE_WRAPPER_SUFFIX.length - )}\n// End Module${MODULE_WRAPPER_SUFFIX}` - : `// Begin Asset Hash=${hash}\n${code}\n// End Asset`; + )}\n// End Module${MODULE_WRAPPER_SUFFIX}`; + } else { + // Handle asset format + return `// Begin Asset Hash=${hash}\n${code}\n// End Asset`; + } + }; + + const processedCode: string = getProcessedCode(); callback({ hash, diff --git a/webpack/webpack5-module-minifier-plugin/src/test/WebpackOutputFormats.test.ts b/webpack/webpack5-module-minifier-plugin/src/test/WebpackOutputFormats.test.ts new file mode 100644 index 00000000000..84f5250fbe8 --- /dev/null +++ b/webpack/webpack5-module-minifier-plugin/src/test/WebpackOutputFormats.test.ts @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +jest.disableAutomock(); +import { promisify } from 'node:util'; + +import webpack, { type Stats, type InputFileSystem, type OutputFileSystem } from 'webpack'; +import { Volume } from 'memfs/lib/volume'; + +import { ModuleMinifierPlugin } from '../ModuleMinifierPlugin'; +import { MockMinifier } from './MockMinifier'; + +jest.setTimeout(1e9); + +interface ITestEnvironment { + methodShorthand?: boolean; + arrowFunction?: boolean; + const?: boolean; + destructuring?: boolean; + forOf?: boolean; + module?: boolean; +} + +async function runWebpackWithEnvironment(environment: ITestEnvironment): Promise<{ + errors: webpack.StatsError[]; + warnings: webpack.StatsError[]; + requests: Array<[string, string]>; +}> { + const mockMinifier: MockMinifier = new MockMinifier(); + const memoryFileSystem: Volume = new Volume(); + memoryFileSystem.fromJSON( + { + '/package.json': '{}', + '/entry.js': `import('./module.js').then(m => m.test());`, + '/module.js': `export function test() { console.log("test"); }` + }, + '/src' + ); + + const minifierPlugin: ModuleMinifierPlugin = new ModuleMinifierPlugin({ + minifier: mockMinifier + }); + + const compiler: webpack.Compiler = webpack({ + entry: '/entry.js', + output: { + path: '/release', + filename: 'bundle.js', + environment + }, + optimization: { + minimizer: [] + }, + context: '/', + mode: 'production', + plugins: [minifierPlugin] + }); + + compiler.inputFileSystem = memoryFileSystem as unknown as InputFileSystem; + compiler.outputFileSystem = memoryFileSystem as unknown as OutputFileSystem; + + const stats: Stats | undefined = await promisify(compiler.run.bind(compiler))(); + await promisify(compiler.close.bind(compiler)); + if (!stats) { + throw new Error(`Expected stats`); + } + const { errors, warnings } = stats.toJson('errors-warnings'); + + const requests: Array<[string, string]> = Array.from(mockMinifier.requests.entries()); + + return { errors: errors || [], warnings: warnings || [], requests }; +} + +describe('WebpackOutputFormats', () => { + it('Captures code sent to minifier with methodShorthand=false, arrowFunction=false', async () => { + const { errors, warnings, requests } = await runWebpackWithEnvironment({ + methodShorthand: false, + arrowFunction: false, + const: false, + destructuring: false, + forOf: false, + module: false + }); + + expect(errors).toMatchSnapshot('Errors'); + expect(warnings).toMatchSnapshot('Warnings'); + + // Verify modules are wrapped with regular function format + for (const [, code] of requests) { + if (code.includes('__MINIFY_MODULE__')) { + expect(code).toMatch(/^__MINIFY_MODULE__\(/); + expect(code).toMatch(/\);$/); + // With methodShorthand=false and arrowFunction=false, expect function keyword + expect(code).toContain('function'); + expect(code).not.toContain('=>'); + } + } + expect(requests).toMatchSnapshot('Minifier Requests'); + }); + + it('Captures code sent to minifier with methodShorthand=false, arrowFunction=true', async () => { + const { errors, warnings, requests } = await runWebpackWithEnvironment({ + methodShorthand: false, + arrowFunction: true, + const: true, + destructuring: true, + forOf: true, + module: false + }); + + expect(errors).toMatchSnapshot('Errors'); + expect(warnings).toMatchSnapshot('Warnings'); + + // Verify modules use arrow function format when arrowFunction=true + for (const [, code] of requests) { + if (code.includes('__MINIFY_MODULE__')) { + expect(code).toMatch(/^__MINIFY_MODULE__\(/); + expect(code).toMatch(/\);$/); + // With arrowFunction=true, may have arrow functions in module code + // but the module wrapper itself uses the rendered format + } + } + expect(requests).toMatchSnapshot('Minifier Requests'); + }); + + it('Captures code sent to minifier with methodShorthand=true', async () => { + const { errors, warnings, requests } = await runWebpackWithEnvironment({ + methodShorthand: true, + arrowFunction: true, + const: true, + destructuring: true, + forOf: true, + module: false + }); + + expect(errors).toMatchSnapshot('Errors'); + expect(warnings).toMatchSnapshot('Warnings'); + + // Verify modules are wrapped with shorthand format when methodShorthand=true + for (const [, code] of requests) { + if (code.includes('__MINIFY_MODULE__')) { + expect(code).toMatch(/^__MINIFY_MODULE__\(/); + expect(code).toMatch(/\);$/); + // With methodShorthand=true, expect shorthand wrapper with __DEFAULT_ID__ + if (code.includes('__DEFAULT_ID__')) { + expect(code).toContain('__DEFAULT_ID__'); + } + } + } + expect(requests).toMatchSnapshot('Minifier Requests'); + }); +}); diff --git a/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/AmdExternals.test.ts.snap b/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/AmdExternals.test.ts.snap index f312cf45b73..6c18005850e 100644 --- a/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/AmdExternals.test.ts.snap +++ b/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/AmdExternals.test.ts.snap @@ -3,14 +3,13 @@ exports[`ModuleMinifierPlugin Handles AMD externals (mock): Content 1`] = ` Object { "/release/async.js": "/*! For license information please see async.js.LICENSE.txt */ -// Begin Asset Hash=655b529b81e93f7a1183b61fa3b1dbbe25467d6bd138d4f910613108a606277c +// Begin Asset Hash=2b90e947f1aba7d9ab9f0b62e1ede9281ad8fb42f6ede6f7b4213d5d1356ab8e \\"use strict\\"; (self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []).push([[157],{ /***/ 541 -// Begin Module Hash=48b8804731aa35805afdba31bf24a39136ebfd93f6be0f3e353452a94e9b5818 - +// Begin Module Hash=aa928190bac95603578bbc24c65647633e6305dc69d46edaf07d710fc69da78d (__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { @@ -26,10 +25,10 @@ Object { function foo() { bar__WEBPACK_IMPORTED_MODULE_0___default().a(); baz__WEBPACK_IMPORTED_MODULE_1___default().b(); }console.log(\\"Test character lengths: ￯\\") /***/ } - // End Module + }]); // End Asset", "/release/async.js.LICENSE.txt": "// @license MIT @@ -328,7 +327,7 @@ Object { "async.js" => Object { "positionByModuleId": Map { 541 => Object { - "charLength": 949, + "charLength": 948, "charOffset": 239, }, }, @@ -336,7 +335,7 @@ Object { }, "byModule": Map { 541 => Map { - 157 => 953, + 157 => 952, }, }, } @@ -344,23 +343,39 @@ Object { exports[`ModuleMinifierPlugin Handles AMD externals (mock): Warnings 1`] = `Array []`; -exports[`ModuleMinifierPlugin Handles AMD externals (terser): Content 1`] = `Object {}`; - -exports[`ModuleMinifierPlugin Handles AMD externals (terser): Errors 1`] = ` -Array [ - Object { - "message": "Unexpected token punc «{», expected punc «,»", - }, - Object { - "message": "Unexpected token name «__WEBPACK_CHUNK_MODULE__48b8804731aa35805afdba31bf24a39136ebfd93f6be0f3e353452a94e9b5818», expected punc «,»", - }, -] +exports[`ModuleMinifierPlugin Handles AMD externals (terser): Content 1`] = ` +Object { + "/release/async.js": "/*! For license information please see async.js.LICENSE.txt */ +\\"use strict\\";(self.webpackChunk=self.webpackChunk||[]).push([[157],{541(e,t,n){n.d(t,{foo:()=>s});var a=n(885),i=n.n(a),r=n(653),o=n.n(r);function s(){i().a(),o().b()}console.log(\\"Test character lengths: \\\\ufeff￯\\")} +}]);", + "/release/async.js.LICENSE.txt": "// @license MIT +", + "/release/main.js": "define([\\"bar\\",\\"baz\\"],(e,t)=>(()=>{var n,a={885(t){\\"use strict\\";t.exports=e},653(e){\\"use strict\\";e.exports=t}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return a[e](n,n.exports,r),n.exports}r.m=a,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>\\"async.js\\",r.g=function(){if(\\"object\\"==typeof globalThis)return globalThis;try{return this||new Function(\\"return this\\")()}catch(e){if(\\"object\\"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r.l=(e,t,a,i)=>{if(n[e])n[e].push(t);else{var o,s;if(void 0!==a)for(var c=document.getElementsByTagName(\\"script\\"),d=0;d{o.onerror=o.onload=null,clearTimeout(f);var i=n[e];if(delete n[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(a)),t)return t(a)},f=setTimeout(u.bind(null,void 0,{type:\\"timeout\\",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),s&&document.head.appendChild(o)}},(()=>{var e;r.g.importScripts&&(e=r.g.location+\\"\\");var t=r.g.document;if(!e&&t&&(t.currentScript&&\\"SCRIPT\\"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName(\\"script\\");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error(\\"Automatic publicPath is not supported in this browser\\");e=e.replace(/^blob:/,\\"\\").replace(/#.*$/,\\"\\").replace(/\\\\?.*$/,\\"\\").replace(/\\\\/[^\\\\/]+$/,\\"/\\"),r.p=e})(),(()=>{var e={792:0};r.f.j=(t,n)=>{var a=r.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var i=new Promise((n,i)=>a=e[t]=[n,i]);n.push(a[2]=i);var o=r.p+r.u(t),s=new Error;r.l(o,n=>{if(r.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=n&&(\\"load\\"===n.type?\\"missing\\":n.type),o=n&&n.target&&n.target.src;s.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+i+\\": \\"+o+\\")\\",s.name=\\"ChunkLoadError\\",s.type=i,s.request=o,a[1](s)}},\\"chunk-\\"+t,t)}};var t=(t,n)=>{var a,i,[o,s,c]=n,d=0;if(o.some(t=>0!==e[t])){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);if(c)c(r)}for(t&&t(n);de.foo()),{}})());", +} `; +exports[`ModuleMinifierPlugin Handles AMD externals (terser): Errors 1`] = `Array []`; + exports[`ModuleMinifierPlugin Handles AMD externals (terser): Metadata 1`] = ` Object { - "byAssetFilename": Map {}, - "byModule": Map {}, + "byAssetFilename": Map { + "main.js" => Object { + "positionByModuleId": Map {}, + }, + "async.js" => Object { + "positionByModuleId": Map { + 541 => Object { + "charLength": 143, + "charOffset": 134, + }, + }, + }, + }, + "byModule": Map { + 541 => Map { + 157 => 145, + }, + }, } `; diff --git a/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/MultipleRuntimes.test.ts.snap b/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/MultipleRuntimes.test.ts.snap index 5e35f50f4ce..cd9ab003aa7 100644 --- a/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/MultipleRuntimes.test.ts.snap +++ b/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/MultipleRuntimes.test.ts.snap @@ -3,14 +3,13 @@ exports[`ModuleMinifierPlugin Handles multiple runtimes (mock): Content 1`] = ` Object { "/release/async-1.js": "/*! For license information please see async-1.js.LICENSE.txt */ -// Begin Asset Hash=a1688ad69c48f410b100af6ce42e782e0cdf03d253fe97f335a0f2a4532940f6 +// Begin Asset Hash=085012829ea4cae1a903bd58aaadebd847ce0c282dc4eebe4c2d3e3be29033fa \\"use strict\\"; (self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []).push([[527],{ /***/ 923 -// Begin Module Hash=cff8175a0574af55cbc63c329b94bbe9a3b655c33d316f21fc148a7a16c7a239 - +// Begin Module Hash=522ee27cac2edf706f26b73b1e5ec4bc44feefe1107c5e303f671547dff3b8d1 (__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { @@ -20,14 +19,13 @@ Object { function async1() { console.log('async-1'); } /***/ } - // End Module + , /***/ 541 -// Begin Module Hash=e9b51a8d04b67d47826b5a8e432e98a6f0a3bdb8f91960b6b38ca0b9c4605acf - +// Begin Module Hash=14a0bb00c5013f9feddec4295e04895cfcfa3097bb63589ab295671d5160d6d7 (__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { @@ -39,24 +37,23 @@ function async1() { console.log('async-1'); } /***/ } - // End Module + }]); // End Asset", "/release/async-1.js.LICENSE.txt": "// @license BAR // @license MIT ", "/release/async-2.js": "/*! For license information please see async-2.js.LICENSE.txt */ -// Begin Asset Hash=c989959df0b37ccd032e5971a2f21fb94c30ce647806238af544420acab206c2 +// Begin Asset Hash=8b416dc2fd2e47bba393fe80905d8387a2191ab33a079e6a9f31cef8099e7fb7 \\"use strict\\"; (self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []).push([[324],{ /***/ 454 -// Begin Module Hash=d8feb285437db6618631b5f45ab2c916568525d13ea8c83ec66a12519fee0be1 - +// Begin Module Hash=9fa9db01a39f213b0bad42889493581d8a3cc9d76f3b77543aa34e2cfc6622ed (__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { @@ -66,14 +63,13 @@ function async1() { console.log('async-1'); } function a2() { console.log('async-2'); } /***/ } - // End Module + , /***/ 541 -// Begin Module Hash=1be277bc6acc5381ce17192820f2a88d34051c50e80f442c316ba197caff8799 - +// Begin Module Hash=3fec3b0c7ee16396d8ef12681a9752d11a86a589b744cebb7451ad0a1b16a50b (__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { @@ -85,10 +81,10 @@ function a2() { console.log('async-2'); } /***/ } - // End Module + }]); // End Asset", "/release/async-2.js.LICENSE.txt": "// @license BAZ @@ -611,38 +607,38 @@ Object { "async-1.js" => Object { "positionByModuleId": Map { 923 => Object { - "charLength": 395, + "charLength": 394, "charOffset": 241, }, 541 => Object { - "charLength": 486, - "charOffset": 650, + "charLength": 485, + "charOffset": 649, }, }, }, "async-2.js" => Object { "positionByModuleId": Map { 454 => Object { - "charLength": 383, + "charLength": 382, "charOffset": 241, }, 541 => Object { - "charLength": 478, - "charOffset": 638, + "charLength": 477, + "charOffset": 637, }, }, }, }, "byModule": Map { 923 => Map { - 527 => 395, + 527 => 394, }, 541 => Map { - 527 => 486, - 324 => 478, + 527 => 485, + 324 => 477, }, 454 => Map { - 324 => 383, + 324 => 382, }, }, } @@ -650,35 +646,75 @@ Object { exports[`ModuleMinifierPlugin Handles multiple runtimes (mock): Warnings 1`] = `Array []`; -exports[`ModuleMinifierPlugin Handles multiple runtimes (terser): Content 1`] = `Object {}`; - -exports[`ModuleMinifierPlugin Handles multiple runtimes (terser): Errors 1`] = ` -Array [ - Object { - "message": "Unexpected token punc «{», expected punc «,»", - }, - Object { - "message": "Unexpected token punc «{», expected punc «,»", - }, - Object { - "message": "Unexpected token punc «{», expected punc «,»", - }, - Object { - "message": "Unexpected token punc «{», expected punc «,»", - }, - Object { - "message": "Unexpected token name «__WEBPACK_CHUNK_MODULE__cff8175a0574af55cbc63c329b94bbe9a3b655c33d316f21fc148a7a16c7a239», expected punc «,»", - }, - Object { - "message": "Unexpected token name «__WEBPACK_CHUNK_MODULE__d8feb285437db6618631b5f45ab2c916568525d13ea8c83ec66a12519fee0be1», expected punc «,»", - }, -] +exports[`ModuleMinifierPlugin Handles multiple runtimes (terser): Content 1`] = ` +Object { + "/release/async-1.js": "/*! For license information please see async-1.js.LICENSE.txt */ +\\"use strict\\";(self.webpackChunk=self.webpackChunk||[]).push([[527],{923(e,t,n){function a(){console.log(\\"async-1\\")}n.d(t,{async1:()=>a})} +,541(e,t,n){n.d(t,{async1:()=>a.async1});var a=n(923)} +}]);", + "/release/async-1.js.LICENSE.txt": "// @license BAR +// @license MIT +", + "/release/async-2.js": "/*! For license information please see async-2.js.LICENSE.txt */ +\\"use strict\\";(self.webpackChunk=self.webpackChunk||[]).push([[324],{454(e,t,n){function a(){console.log(\\"async-2\\")}n.d(t,{a2:()=>a})} +,541(e,t,n){n.d(t,{a2:()=>a.a2});var a=n(454)} +}]);", + "/release/async-2.js.LICENSE.txt": "// @license BAZ +// @license MIT +", + "/release/entry1.js": "(()=>{var e,t={},n={};function a(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>\\"async-1.js\\",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),e={},a.l=(t,n,i,r)=>{if(e[t])e[t].push(n);else{var o,s;if(void 0!==i)for(var c=document.getElementsByTagName(\\"script\\"),d=0;d{o.onerror=o.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(a)),n)return n(a)},f=setTimeout(u.bind(null,void 0,{type:\\"timeout\\",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),s&&document.head.appendChild(o)}},(()=>{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 n=t.getElementsByTagName(\\"script\\");if(n.length)for(var i=n.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=n[i--].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={834:0};a.f.j=(t,n)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise((n,a)=>i=e[t]=[n,a]);n.push(i[2]=r);var o=a.p+a.u(t),s=new Error;a.l(o,n=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&(\\"load\\"===n.type?\\"missing\\":n.type),o=n&&n.target&&n.target.src;s.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+r+\\": \\"+o+\\")\\",s.name=\\"ChunkLoadError\\",s.type=r,s.request=o,i[1](s)}},\\"chunk-\\"+t,t)}};var t=(t,n)=>{var i,r,[o,s,c]=n,d=0;if(o.some(t=>0!==e[t])){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(c)c(a)}for(t&&t(n);de.async1()),a.e(527).then(a.bind(a,923)).then(e=>e.async1())})();", + "/release/entry2.js": "(()=>{var e,t={},n={};function a(e){var i=n[e];if(void 0!==i)return i.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>\\"async-2.js\\",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),e={},a.l=(t,n,i,r)=>{if(e[t])e[t].push(n);else{var o,s;if(void 0!==i)for(var c=document.getElementsByTagName(\\"script\\"),d=0;d{o.onerror=o.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach(e=>e(a)),n)return n(a)},f=setTimeout(u.bind(null,void 0,{type:\\"timeout\\",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),s&&document.head.appendChild(o)}},(()=>{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 n=t.getElementsByTagName(\\"script\\");if(n.length)for(var i=n.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=n[i--].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={441:0};a.f.j=(t,n)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise((n,a)=>i=e[t]=[n,a]);n.push(i[2]=r);var o=a.p+a.u(t),s=new Error;a.l(o,n=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&(\\"load\\"===n.type?\\"missing\\":n.type),o=n&&n.target&&n.target.src;s.message=\\"Loading chunk \\"+t+\\" failed.\\\\n(\\"+r+\\": \\"+o+\\")\\",s.name=\\"ChunkLoadError\\",s.type=r,s.request=o,i[1](s)}},\\"chunk-\\"+t,t)}};var t=(t,n)=>{var i,r,[o,s,c]=n,d=0;if(o.some(t=>0!==e[t])){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(c)c(a)}for(t&&t(n);de.a2()),a.e(324).then(a.bind(a,454)).then(e=>e.a2())})();", +} `; +exports[`ModuleMinifierPlugin Handles multiple runtimes (terser): Errors 1`] = `Array []`; + exports[`ModuleMinifierPlugin Handles multiple runtimes (terser): Metadata 1`] = ` Object { - "byAssetFilename": Map {}, - "byModule": Map {}, + "byAssetFilename": Map { + "entry1.js" => Object { + "positionByModuleId": Map {}, + }, + "entry2.js" => Object { + "positionByModuleId": Map {}, + }, + "async-1.js" => Object { + "positionByModuleId": Map { + 923 => Object { + "charLength": 66, + "charOffset": 136, + }, + 541 => Object { + "charLength": 50, + "charOffset": 207, + }, + }, + }, + "async-2.js" => Object { + "positionByModuleId": Map { + 454 => Object { + "charLength": 62, + "charOffset": 136, + }, + 541 => Object { + "charLength": 42, + "charOffset": 203, + }, + }, + }, + }, + "byModule": Map { + 923 => Map { + 527 => 66, + }, + 541 => Map { + 527 => 50, + 324 => 42, + }, + 454 => Map { + 324 => 62, + }, + }, } `; diff --git a/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/WebpackOutputFormats.test.ts.snap b/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/WebpackOutputFormats.test.ts.snap new file mode 100644 index 00000000000..6bd13bf018d --- /dev/null +++ b/webpack/webpack5-module-minifier-plugin/src/test/__snapshots__/WebpackOutputFormats.test.ts.snap @@ -0,0 +1,841 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=false, arrowFunction=false: Errors 1`] = `Array []`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=false, arrowFunction=false: Minifier Requests 1`] = ` +Array [ + Array [ + "4eb58e74a75784b7e5717fbef0522215be2694128456291ca643dff55c30e49d", + "__MINIFY_MODULE__( +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ test: function() { return /* binding */ test; } +/* harmony export */ }); +function test() { console.log(\\"test\\"); } + +/***/ }) +);", + ], + Array [ + "07362ab528d006b3b2ea7adecb8c2a4a2ceae2528a2a33308d555a1b9aa50a8b", + "/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ !function() { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = function(chunkId) { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ !function() { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = function(chunkId) { +/******/ // return url for filenames based on template +/******/ return \\"\\" + chunkId + \\".bundle.js\\"; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ !function() { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ !function() { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = function(url, done, key, chunkId) { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName(\\"script\\"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute(\\"src\\") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute(\\"nonce\\", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = function(prev, event) { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach(function(fn) { return fn(event); }); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ !function() { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \\"\\"; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName(\\"script\\"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string (\\"\\") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error(\\"Automatic publicPath is not supported in this browser\\"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, \\"\\").replace(/#.*$/, \\"\\").replace(/\\\\?.*$/, \\"\\").replace(/\\\\/[^\\\\/]+$/, \\"/\\"); +/******/ __webpack_require__.p = scriptUrl; +/******/ }(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ !function() { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 792: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = function(chunkId, promises) { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means \\"already installed\\". +/******/ +/******/ // a Promise means \\"currently loading\\". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; }); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = function(event) { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\\\\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, \\"chunk-\\" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = function(parentChunkLoadingFunction, data) { +/******/ var chunkIds = data[0]; +/******/ var moreModules = data[1]; +/******/ var runtime = data[2]; +/******/ // add \\"moreModules\\" to the modules object, +/******/ // then flag all \\"chunkIds\\" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +__webpack_require__.e(/* import() */ 93).then(__webpack_require__.bind(__webpack_require__, 93)).then(m => m.test()); +/******/ })() +;", + ], + Array [ + "40e3e96266b692566423502f3086614f2ff2a9fde3e8bef48a4baddb650bcb69", + "\\"use strict\\"; +(self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []).push([[93],{ + +/***/ 93: +__WEBPACK_CHUNK_MODULE__4eb58e74a75784b7e5717fbef0522215be2694128456291ca643dff55c30e49d + +}]);", + ], +] +`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=false, arrowFunction=false: Warnings 1`] = `Array []`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=false, arrowFunction=true: Errors 1`] = `Array []`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=false, arrowFunction=true: Minifier Requests 1`] = ` +Array [ + Array [ + "1d3f0f2f97e8093d393756ee6123f0f316590565da717a4f2d04d19f5e41279d", + "__MINIFY_MODULE__( +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ test: () => (/* binding */ test) +/* harmony export */ }); +function test() { console.log(\\"test\\"); } + +/***/ }) +);", + ], + Array [ + "f718caead6acd912defaa08887a9e7ef1e32b1408df9bf552487b71bb437718b", + "/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return \\"\\" + chunkId + \\".bundle.js\\"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName(\\"script\\"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute(\\"src\\") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute(\\"nonce\\", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \\"\\"; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName(\\"script\\"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string (\\"\\") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error(\\"Automatic publicPath is not supported in this browser\\"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, \\"\\").replace(/#.*$/, \\"\\").replace(/\\\\?.*$/, \\"\\").replace(/\\\\/[^\\\\/]+$/, \\"/\\"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 792: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means \\"already installed\\". +/******/ +/******/ // a Promise means \\"currently loading\\". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\\\\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, \\"chunk-\\" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add \\"moreModules\\" to the modules object, +/******/ // then flag all \\"chunkIds\\" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +__webpack_require__.e(/* import() */ 93).then(__webpack_require__.bind(__webpack_require__, 93)).then(m => m.test()); +/******/ })() +;", + ], + Array [ + "bf6f984ec3f861c1468f0002d67bfabfd75f07c8495709561fc5f7b6033523ba", + "\\"use strict\\"; +(self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []).push([[93],{ + +/***/ 93: +__WEBPACK_CHUNK_MODULE__1d3f0f2f97e8093d393756ee6123f0f316590565da717a4f2d04d19f5e41279d + +}]);", + ], +] +`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=false, arrowFunction=true: Warnings 1`] = `Array []`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=true: Errors 1`] = `Array []`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=true: Minifier Requests 1`] = ` +Array [ + Array [ + "eb1ac8562b7834b56d1fea53ba5efad6fe29b66ef335b63e0723c38e162a92b0", + "__MINIFY_MODULE__({__DEFAULT_ID__(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ test: () => (/* binding */ test) +/* harmony export */ }); +function test() { console.log(\\"test\\"); } + +/***/ }});", + ], + Array [ + "f718caead6acd912defaa08887a9e7ef1e32b1408df9bf552487b71bb437718b", + "/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ __webpack_require__.f = {}; +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = (chunkId) => { +/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { +/******/ __webpack_require__.f[key](chunkId, promises); +/******/ return promises; +/******/ }, [])); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/get javascript chunk filename */ +/******/ (() => { +/******/ // This function allow to reference async chunks +/******/ __webpack_require__.u = (chunkId) => { +/******/ // return url for filenames based on template +/******/ return \\"\\" + chunkId + \\".bundle.js\\"; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/load script */ +/******/ (() => { +/******/ var inProgress = {}; +/******/ // data-webpack is not used as build has no uniqueName +/******/ // loadScript function to load a script via script tag +/******/ __webpack_require__.l = (url, done, key, chunkId) => { +/******/ if(inProgress[url]) { inProgress[url].push(done); return; } +/******/ var script, needAttach; +/******/ if(key !== undefined) { +/******/ var scripts = document.getElementsByTagName(\\"script\\"); +/******/ for(var i = 0; i < scripts.length; i++) { +/******/ var s = scripts[i]; +/******/ if(s.getAttribute(\\"src\\") == url) { script = s; break; } +/******/ } +/******/ } +/******/ if(!script) { +/******/ needAttach = true; +/******/ script = document.createElement('script'); +/******/ +/******/ script.charset = 'utf-8'; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute(\\"nonce\\", __webpack_require__.nc); +/******/ } +/******/ +/******/ +/******/ script.src = url; +/******/ } +/******/ inProgress[url] = [done]; +/******/ var onScriptComplete = (prev, event) => { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var doneFns = inProgress[url]; +/******/ delete inProgress[url]; +/******/ script.parentNode && script.parentNode.removeChild(script); +/******/ doneFns && doneFns.forEach((fn) => (fn(event))); +/******/ if(prev) return prev(event); +/******/ } +/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000); +/******/ script.onerror = onScriptComplete.bind(null, script.onerror); +/******/ script.onload = onScriptComplete.bind(null, script.onload); +/******/ needAttach && document.head.appendChild(script); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \\"\\"; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName(\\"script\\"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string (\\"\\") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error(\\"Automatic publicPath is not supported in this browser\\"); +/******/ scriptUrl = scriptUrl.replace(/^blob:/, \\"\\").replace(/#.*$/, \\"\\").replace(/\\\\?.*$/, \\"\\").replace(/\\\\/[^\\\\/]+$/, \\"/\\"); +/******/ __webpack_require__.p = scriptUrl; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 792: 0 +/******/ }; +/******/ +/******/ __webpack_require__.f.j = (chunkId, promises) => { +/******/ // JSONP chunk loading for javascript +/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; +/******/ if(installedChunkData !== 0) { // 0 means \\"already installed\\". +/******/ +/******/ // a Promise means \\"currently loading\\". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ if(true) { // all chunks have JS +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject])); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ var loadingEnded = (event) => { +/******/ if(__webpack_require__.o(installedChunks, chunkId)) { +/******/ installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; +/******/ if(installedChunkData) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\\\\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ installedChunkData[1](error); +/******/ } +/******/ } +/******/ }; +/******/ __webpack_require__.l(url, loadingEnded, \\"chunk-\\" + chunkId, chunkId); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ // no on chunks loaded +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add \\"moreModules\\" to the modules object, +/******/ // then flag all \\"chunkIds\\" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +__webpack_require__.e(/* import() */ 93).then(__webpack_require__.bind(__webpack_require__, 93)).then(m => m.test()); +/******/ })() +;", + ], + Array [ + "735c5a00c9550935174621d8349cd087e1f2c3384eefb4fe5601e17ef7b8b1dd", + "\\"use strict\\"; +(self[\\"webpackChunk\\"] = self[\\"webpackChunk\\"] || []).push([[93],{ + +/***/ 93 +:__WEBPACK_CHUNK_MODULE__eb1ac8562b7834b56d1fea53ba5efad6fe29b66ef335b63e0723c38e162a92b0 + +}]);", + ], +] +`; + +exports[`WebpackOutputFormats Captures code sent to minifier with methodShorthand=true: Warnings 1`] = `Array []`;