diff --git a/lib/dependencies/CommonJsExportsDependency.js b/lib/dependencies/CommonJsExportsDependency.js index 60533b68e..29a3f3ec0 100644 --- a/lib/dependencies/CommonJsExportsDependency.js +++ b/lib/dependencies/CommonJsExportsDependency.js @@ -88,46 +88,94 @@ CommonJsExportsDependency.Template = class CommonJsExportsDependencyTemplate ext } else { used = moduleGraph.getExportsInfo(module).getUsedName(dep.names); } - if (!used) { - initFragments.push( - new InitFragment( - "var __webpack_unused_export__;\n", - InitFragment.STAGE_CONSTANTS, - 0, - "__webpack_unused_export__" - ) - ); - source.replace( - dep.range[0], - dep.range[1] - 1, - "__webpack_unused_export__" - ); - return; - } let base = undefined; + let type; switch (dep.base) { case "exports": runtimeRequirements.add(RuntimeGlobals.exports); base = module.exportsArgument; + type = "expression"; break; case "module.exports": runtimeRequirements.add(RuntimeGlobals.module); base = `${module.moduleArgument}.exports`; + type = "expression"; break; case "this": runtimeRequirements.add(RuntimeGlobals.thisAsExports); base = "this"; + type = "expression"; + break; + case "Object.defineProperty(exports)": + runtimeRequirements.add(RuntimeGlobals.exports); + base = module.exportsArgument; + type = "Object.defineProperty"; + break; + case "Object.defineProperty(module.exports)": + runtimeRequirements.add(RuntimeGlobals.module); + base = `${module.moduleArgument}.exports`; + type = "Object.defineProperty"; + break; + case "Object.defineProperty(this)": + runtimeRequirements.add(RuntimeGlobals.thisAsExports); + base = "this"; + type = "Object.defineProperty"; break; default: throw new Error(`Unsupported base ${dep.base}`); } - source.replace( - dep.range[0], - dep.range[1] - 1, - `${base}${propertyAccess(used)}` - ); + switch (type) { + case "expression": + if (!used) { + initFragments.push( + new InitFragment( + "var __webpack_unused_export__;\n", + InitFragment.STAGE_CONSTANTS, + 0, + "__webpack_unused_export__" + ) + ); + source.replace( + dep.range[0], + dep.range[1] - 1, + "__webpack_unused_export__" + ); + return; + } + source.replace( + dep.range[0], + dep.range[1] - 1, + `${base}${propertyAccess(used)}` + ); + return; + case "Object.defineProperty": + if (!used) { + initFragments.push( + new InitFragment( + "var __webpack_unused_export__;\n", + InitFragment.STAGE_CONSTANTS, + 0, + "__webpack_unused_export__" + ) + ); + source.replace( + dep.range[0], + dep.range[1] - 1, + "__webpack_unused_export__ = (" + ); + return; + } + source.replace( + dep.range[0], + dep.range[1] - 1, + `Object.defineProperty(${base}${propertyAccess( + used.slice(0, -1) + )}, ${JSON.stringify(used[used.length - 1])}, ` + ); + return; + } } }; diff --git a/lib/dependencies/CommonJsExportsParserPlugin.js b/lib/dependencies/CommonJsExportsParserPlugin.js index 0a8a682a2..1c2cdc5bb 100644 --- a/lib/dependencies/CommonJsExportsParserPlugin.js +++ b/lib/dependencies/CommonJsExportsParserPlugin.js @@ -19,6 +19,36 @@ const ModuleDecoratorDependency = require("./ModuleDecoratorDependency"); /** @type {WeakMap} */ const moduleExportsState = new WeakMap(); +const getValueOfPropertyDescription = expr => { + if (expr.type !== "ObjectExpression") return; + for (const property of expr.properties) { + if (property.computed) continue; + const key = property.key; + if (key.type !== "Identifier" || key.name !== "value") continue; + return property.value; + } +}; + +const isTruthyLiteral = expr => { + switch (expr.type) { + case "Literal": + return !!expr.value; + case "UnaryExpression": + if (expr.operator === "!") return isFalsyLiteral(expr.argument); + } + return false; +}; + +const isFalsyLiteral = expr => { + switch (expr.type) { + case "Literal": + return !expr.value; + case "UnaryExpression": + if (expr.operator === "!") return isTruthyLiteral(expr.argument); + } + return false; +}; + class CommonJsExportsParserPlugin { static bailout(module) { const value = moduleExportsState.get(module); @@ -39,11 +69,7 @@ class CommonJsExportsParserPlugin { const checkNamespace = (members, valueExpr) => { if (!DynamicExports.isEnabled(parser.state.module)) return; if (members.length > 0 && members[0] === "__esModule") { - if ( - valueExpr && - valueExpr.type === "Literal" && - valueExpr.value === true - ) { + if (isTruthyLiteral(valueExpr)) { DynamicExports.setFlagged(parser.state.module); } else { DynamicExports.bailout(parser.state.module); @@ -110,6 +136,41 @@ class CommonJsExportsParserPlugin { parser.state.module.addDependency(dep); return true; }); + parser.hooks.call + .for("Object.defineProperty") + .tap("CommonJsExportsParserPlugin", expression => { + const expr = /** @type {import("estree").CallExpression} */ (expression); + if (expr.arguments.length !== 3) return; + if (expr.arguments[0].type === "SpreadElement") return; + if (expr.arguments[1].type === "SpreadElement") return; + if (expr.arguments[2].type === "SpreadElement") return; + const exportsArg = parser.evaluateExpression(expr.arguments[0]); + if (!exportsArg || !exportsArg.isIdentifier()) return; + if ( + exportsArg.identifier !== "exports" && + exportsArg.identifier !== "module.exports" && + exportsArg.identifier !== "this" + ) { + return; + } + const propertyArg = parser.evaluateExpression(expr.arguments[1]); + if (!propertyArg) return; + const property = propertyArg.asString(); + if (typeof property !== "string") return; + enableStructuredExports(); + const descArg = expr.arguments[2]; + checkNamespace([property], getValueOfPropertyDescription(descArg)); + const dep = new CommonJsExportsDependency( + [expr.callee.range[0], expr.arguments[2].range[0]], + `Object.defineProperty(${exportsArg.identifier})`, + [property] + ); + dep.loc = expr.loc; + parser.state.module.addDependency(dep); + + parser.walkExpression(expr.arguments[2]); + return true; + }); // Self reference // parser.hooks.expression diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index b37fa12ed..32739512b 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -473,7 +473,7 @@ chunk main1.js (main1) 136 bytes (javascript) 668 bytes (runtime) [entry] [rende `; exports[`StatsTestCases should print correct stats for chunks 1`] = ` -"Hash: 65c019fccbbaab6c12f6 +"Hash: 8aa3985794dcb0a9189a Time: Xms Built at: 1970-04-20 12:42:42 PublicPath: (none) @@ -517,7 +517,7 @@ chunk 996.bundle.js 22 bytes <{179}> [rendered] `; exports[`StatsTestCases should print correct stats for chunks-development 1`] = ` -"Hash: 9399ce5662cf70e6bfc2 +"Hash: bb9c09a55e8e0ee99069 Time: Xms Built at: 1970-04-20 12:42:42 PublicPath: (none) @@ -605,7 +605,7 @@ Entrypoint main = main.js `; exports[`StatsTestCases should print correct stats for commons-chunk-min-size-0 1`] = ` -"Hash: 3349fe8ddbcb80daa31b +"Hash: 52d6ddbdf7da6ee8696f Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -623,7 +623,7 @@ Entrypoint entry-1 = 429.js entry-1.js `; exports[`StatsTestCases should print correct stats for commons-chunk-min-size-Infinity 1`] = ` -"Hash: 22cdb4ffed59c1230a1d +"Hash: 1ac8d9f0a39f52c3c2a6 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -692,7 +692,7 @@ Child Asset Size 703-3e2afd6460ceb1cd6f5f.js 438 bytes [emitted] [immutable] 703-3e2afd6460ceb1cd6f5f.js.map 343 bytes [emitted] [dev] - main-a1003986d61ab330d2c5.js 8.13 KiB [emitted] [immutable] [name: main] + main-a1003986d61ab330d2c5.js 8.14 KiB [emitted] [immutable] [name: main] main-a1003986d61ab330d2c5.js.map 7.2 KiB [emitted] [dev] [name: (main)] Entrypoint main = main-a1003986d61ab330d2c5.js (main-a1003986d61ab330d2c5.js.map) ./a/index.js 40 bytes [built] @@ -705,7 +705,7 @@ Child Asset Size 703-3e2afd6460ceb1cd6f5f.js 438 bytes [emitted] [immutable] 703-3e2afd6460ceb1cd6f5f.js.map 343 bytes [emitted] [dev] - main-a1003986d61ab330d2c5.js 8.13 KiB [emitted] [immutable] [name: main] + main-a1003986d61ab330d2c5.js 8.14 KiB [emitted] [immutable] [name: main] main-a1003986d61ab330d2c5.js.map 7.2 KiB [emitted] [dev] [name: (main)] Entrypoint main = main-a1003986d61ab330d2c5.js (main-a1003986d61ab330d2c5.js.map) ./b/index.js 40 bytes [built] @@ -717,7 +717,7 @@ Child Built at: 1970-04-20 12:42:42 Asset Size 703-d51a9ad771055bba3447.js 962 bytes [emitted] [immutable] - main-f8577eeb56b10147974d.js 8.46 KiB [emitted] [immutable] [name: main] + main-f8577eeb56b10147974d.js 8.48 KiB [emitted] [immutable] [name: main] Entrypoint main = main-f8577eeb56b10147974d.js ./a/index.js 40 bytes [built] ./a/chunk.js + 1 modules 66 bytes [built] @@ -728,7 +728,7 @@ Child Built at: 1970-04-20 12:42:42 Asset Size 703-d51a9ad771055bba3447.js 962 bytes [emitted] [immutable] - main-f8577eeb56b10147974d.js 8.46 KiB [emitted] [immutable] [name: main] + main-f8577eeb56b10147974d.js 8.48 KiB [emitted] [immutable] [name: main] Entrypoint main = main-f8577eeb56b10147974d.js ./b/index.js 40 bytes [built] ./b/chunk.js + 1 modules 66 bytes [built] @@ -736,9 +736,9 @@ Child `; exports[`StatsTestCases should print correct stats for define-plugin 1`] = ` -"Hash: 4442854f783336ef600d501d4f6b79c8b5fd5f61fbe480b4bb5cecb64a4e +"Hash: c4dfb63f41372476179f8a83bd0cdb16b7f71a200e0127ecbe2c521924dd Child - Hash: 4442854f783336ef600d + Hash: c4dfb63f41372476179f Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -746,7 +746,7 @@ Child Entrypoint main = 123.js ./index.js 24 bytes [built] Child - Hash: 501d4f6b79c8b5fd5f61 + Hash: 8a83bd0cdb16b7f71a20 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -754,7 +754,7 @@ Child Entrypoint main = 321.js ./index.js 24 bytes [built] Child - Hash: fbe480b4bb5cecb64a4e + Hash: 0e0127ecbe2c521924dd Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -787,7 +787,7 @@ Unexpected end of JSON input while parsing near '' `; exports[`StatsTestCases should print correct stats for exclude-with-loader 1`] = ` -"Hash: 5a7167faee6dedc9c9fb +"Hash: 574b1154129671ae12ac Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -811,9 +811,9 @@ external \\"test\\" 42 bytes [built]" `; exports[`StatsTestCases should print correct stats for filter-warnings 1`] = ` -"Hash: 0080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f9885590670080de99e4f988559067 +"Hash: 9c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed33269c6e8f427e9f60ed3326 Child undefined: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -843,49 +843,49 @@ Child undefined: WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [webpack://./index.js:12,0] Child Terser: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size bundle1.js 556 bytes [emitted] [name: main] Entrypoint main = bundle1.js Child /Terser/: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size bundle2.js 556 bytes [emitted] [name: main] Entrypoint main = bundle2.js Child warnings => true: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size bundle3.js 556 bytes [emitted] [name: main] Entrypoint main = bundle3.js Child [Terser]: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size bundle4.js 556 bytes [emitted] [name: main] Entrypoint main = bundle4.js Child [/Terser/]: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size bundle5.js 556 bytes [emitted] [name: main] Entrypoint main = bundle5.js Child [warnings => true]: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size bundle6.js 556 bytes [emitted] [name: main] Entrypoint main = bundle6.js Child should not filter: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -915,7 +915,7 @@ Child should not filter: WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [webpack://./index.js:12,0] Child /should not filter/: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -945,7 +945,7 @@ Child /should not filter/: WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [webpack://./index.js:12,0] Child warnings => false: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -975,7 +975,7 @@ Child warnings => false: WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [webpack://./index.js:12,0] Child [should not filter]: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1005,7 +1005,7 @@ Child [should not filter]: WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [webpack://./index.js:12,0] Child [/should not filter/]: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1035,7 +1035,7 @@ Child [/should not filter/]: WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [webpack://./index.js:12,0] Child [warnings => false]: - Hash: 0080de99e4f988559067 + Hash: 9c6e8f427e9f60ed3326 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1184,7 +1184,7 @@ Entrypoint entry = entry.js `; exports[`StatsTestCases should print correct stats for import-weak 1`] = ` -"Hash: ec5dea88a7cc1008e8b0 +"Hash: 7160e41d3347e9709803 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1252,7 +1252,7 @@ Child Built at: 1970-04-20 12:42:42 Asset Size c-all-b_js-50bf184dfe57dc2022a6.js 506 bytes [emitted] [immutable] [id hint: all] - c-all-c_js-6756694a5d280748f5a3.js 382 bytes [emitted] [immutable] [id hint: all] + c-all-c_js-6756694a5d280748f5a3.js 397 bytes [emitted] [immutable] [id hint: all] c-main-476756bfcb471445cf2c.js 164 bytes [emitted] [immutable] [name: main] c-runtime~main-912fc4f81a625e30b5f0.js 11.3 KiB [emitted] [immutable] [name: runtime~main] c-vendors-node_modules_vendor_js-a51f8ed2c8dc9ce97afd.js 189 bytes [emitted] [immutable] [id hint: vendors] @@ -1264,9 +1264,9 @@ Child `; exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin 1`] = ` -"Hash: b2c89a6437a95fa215bc0ff0974c4ee3a6bd3675a41c08a99955b5672656ede6bedacdd16cfaeb8e +"Hash: 15b4b06d5bdcf1dbb317c2ee020bd44fb8139f6b23dbaedcbaa797e2000666278eec152159ba577e Child 1 chunks: - Hash: b2c89a6437a95fa215bc + Hash: 15b4b06d5bdcf1dbb317 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1281,7 +1281,7 @@ Child 1 chunks: ./index.js 101 bytes [built] + 4 hidden chunk modules Child 2 chunks: - Hash: 0ff0974c4ee3a6bd3675 + Hash: c2ee020bd44fb8139f6b Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1298,7 +1298,7 @@ Child 2 chunks: ./d.js 22 bytes [built] ./e.js 22 bytes [built] Child 3 chunks: - Hash: a41c08a99955b5672656 + Hash: 23dbaedcbaa797e20006 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1317,7 +1317,7 @@ Child 3 chunks: ./d.js 22 bytes [built] ./e.js 22 bytes [built] Child 4 chunks: - Hash: ede6bedacdd16cfaeb8e + Hash: 66278eec152159ba577e Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1437,7 +1437,7 @@ Entrypoint main = main.js `; exports[`StatsTestCases should print correct stats for module-assets 1`] = ` -"Hash: c24b35ef36e3eabb5332 +"Hash: 7ab754f97dbdb21a19b7 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1445,7 +1445,7 @@ Built at: 1970-04-20 12:42:42 2.png 21 KiB [emitted] [name: (a, b)] a.js 988 bytes [emitted] [name: a] b.js 616 bytes [emitted] [name: b] -main.js 9.07 KiB [emitted] [name: main] +main.js 9.1 KiB [emitted] [name: main] Entrypoint main = main.js Chunk Group a = a.js (1.png 2.png) Chunk Group b = b.js (2.png) @@ -1475,9 +1475,9 @@ exports[`StatsTestCases should print correct stats for module-deduplication 1`] 593.js 681 bytes [emitted] 716.js 734 bytes [emitted] 923.js 734 bytes [emitted] - e1.js 10.2 KiB [emitted] [name: e1] - e2.js 10.2 KiB [emitted] [name: e2] - e3.js 10.2 KiB [emitted] [name: e3] + e1.js 10.3 KiB [emitted] [name: e1] + e2.js 10.3 KiB [emitted] [name: e2] + e3.js 10.3 KiB [emitted] [name: e3] Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1521,9 +1521,9 @@ chunk 923.js 37 bytes [rendered] exports[`StatsTestCases should print correct stats for module-deduplication-named 1`] = ` " Asset Size -async1.js 824 bytes [emitted] [name: async1] -async2.js 824 bytes [emitted] [name: async2] -async3.js 824 bytes [emitted] [name: async3] +async1.js 839 bytes [emitted] [name: async1] +async2.js 839 bytes [emitted] [name: async2] +async3.js 839 bytes [emitted] [name: async3] e1.js 10.1 KiB [emitted] [name: e1] e2.js 10.1 KiB [emitted] [name: e2] e3.js 10.1 KiB [emitted] [name: e3] @@ -1709,7 +1709,7 @@ Child `; exports[`StatsTestCases should print correct stats for named-chunks-plugin 1`] = ` -"Hash: 3c07c25a2aaac52e73fc +"Hash: 477a050407dcda362944 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1724,7 +1724,7 @@ Entrypoint entry = vendor.js entry.js `; exports[`StatsTestCases should print correct stats for named-chunks-plugin-async 1`] = ` -"Hash: 5d738c803a40c5ea2a0b +"Hash: b805309f74f84a36f101 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1821,9 +1821,9 @@ You may need an appropriate loader to handle this file type, currently no loader `; exports[`StatsTestCases should print correct stats for performance-different-mode-and-target 1`] = ` -"Hash: 15b3befa538e5f8a20eb15b3befa538e5f8a20eb15b3befa538e5f8a20eba7f9f2f47914debc52a4a7f9f2f47914debc52a4a7f9f2f47914debc52a415b3befa538e5f8a20eb +"Hash: 604851a4140d08550dd4604851a4140d08550dd4604851a4140d08550dd45cbd53d350a417320d6a5cbd53d350a417320d6a5cbd53d350a417320d6a604851a4140d08550dd4 Child - Hash: 15b3befa538e5f8a20eb + Hash: 604851a4140d08550dd4 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1846,7 +1846,7 @@ Child For more info visit https://webpack.js.org/guides/code-splitting/ Child - Hash: 15b3befa538e5f8a20eb + Hash: 604851a4140d08550dd4 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1869,7 +1869,7 @@ Child For more info visit https://webpack.js.org/guides/code-splitting/ Child - Hash: 15b3befa538e5f8a20eb + Hash: 604851a4140d08550dd4 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1877,7 +1877,7 @@ Child Entrypoint main = no-warning.pro-node.js ./index.js 293 KiB [built] Child - Hash: a7f9f2f47914debc52a4 + Hash: 5cbd53d350a417320d6a Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1885,7 +1885,7 @@ Child Entrypoint main = no-warning.dev-web.js ./index.js 293 KiB [built] Child - Hash: a7f9f2f47914debc52a4 + Hash: 5cbd53d350a417320d6a Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1893,7 +1893,7 @@ Child Entrypoint main = no-warning.dev-node.js ./index.js 293 KiB [built] Child - Hash: a7f9f2f47914debc52a4 + Hash: 5cbd53d350a417320d6a Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -1901,7 +1901,7 @@ Child Entrypoint main [big] = no-warning.dev-web-with-limit-set.js ./index.js 293 KiB [built] Child - Hash: 15b3befa538e5f8a20eb + Hash: 604851a4140d08550dd4 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -2116,7 +2116,7 @@ exports[`StatsTestCases should print correct stats for preset-detailed 1`] = ` <+> [LogTestPlugin] Collaped group [LogTestPlugin] Log [LogTestPlugin] End -Hash: 49680b639c0bd67587ef +Hash: 75c2283ae108b4adfd48 Time: Xms Built at: 1970-04-20 12:42:42 PublicPath: (none) @@ -2236,7 +2236,7 @@ exports[`StatsTestCases should print correct stats for preset-normal 1`] = ` " [LogTestPlugin] Error [LogTestPlugin] Warning [LogTestPlugin] Info -Hash: 49680b639c0bd67587ef +Hash: 75c2283ae108b4adfd48 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -2337,7 +2337,7 @@ exports[`StatsTestCases should print correct stats for preset-verbose 1`] = ` [LogTestPlugin] Inner inner message [LogTestPlugin] Log [LogTestPlugin] End -Hash: 49680b639c0bd67587ef +Hash: 75c2283ae108b4adfd48 Time: Xms Built at: 1970-04-20 12:42:42 PublicPath: (none) @@ -2497,7 +2497,7 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration "Child base: Asset Size without-505.js 1.22 KiB [emitted] - without-main1.js 556 bytes [emitted] [name: main1] + without-main1.js 601 bytes [emitted] [name: main1] without-runtime.js 9.78 KiB [emitted] [name: runtime] Entrypoint main1 = without-runtime.js without-main1.js ./main1.js 66 bytes [built] @@ -2508,7 +2508,7 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration Child manifest is named entry: Asset Size with-505.js 1.22 KiB [emitted] - with-main1.js 556 bytes [emitted] [name: main1] + with-main1.js 601 bytes [emitted] [name: main1] with-manifest.js 9.91 KiB [emitted] [name: manifest] Entrypoint main1 = with-manifest.js with-main1.js Entrypoint manifest = with-manifest.js @@ -2531,7 +2531,7 @@ Entrypoint e2 = runtime.js e2.js" `; exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = ` -"Hash: 0c00bf20955429feb052 +"Hash: ea361a8a1e8207bed262 Time: Xms Built at: 1970-04-20 12:42:42 Entrypoint index = index.js @@ -2613,7 +2613,7 @@ Time: Xms Built at: 1970-04-20 12:42:42 Asset Size 1.js 642 bytes [emitted] -main.js 9.89 KiB [emitted] [name: main] +main.js 9.9 KiB [emitted] [name: main] Entrypoint main = main.js ./main.js + 1 modules 231 bytes [built] [no exports used] @@ -3753,7 +3753,7 @@ require.include() is deprecated and will be removed soon. `; exports[`StatsTestCases should print correct stats for warnings-terser 1`] = ` -"Hash: 015467702c9d7feca34f +"Hash: dcfa5b734e4c3a1e9e77 Time: Xms Built at: 1970-04-20 12:42:42 Asset Size @@ -3790,7 +3790,7 @@ Built at: 1970-04-20 12:42:42 780.bundle.js 526 bytes [emitted] 99.bundle.js 220 bytes [emitted] a0e9dd97d7ced35a5b2c.module.wasm 154 bytes [emitted] [immutable] - bundle.js 11.1 KiB [emitted] [name: main-1df31ce3] + bundle.js 11.2 KiB [emitted] [name: main-1df31ce3] d37b3336426771c2a6e2.module.wasm 531 bytes [emitted] [immutable] ebd3f263522776d85971.module.wasm 156 bytes [emitted] [immutable] Entrypoint main = bundle.js