From d0ef2ce43f2b27318f7971a5b766f4f640e6a55e Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 1 Aug 2020 06:21:29 +0200 Subject: [PATCH] display assets in stats in a list instead of a table group related assets below the parent asset --- declarations/WebpackOptions.d.ts | 4 + lib/stats/DefaultStatsFactoryPlugin.js | 105 ++- lib/stats/DefaultStatsPresetPlugin.js | 3 + lib/stats/DefaultStatsPrinterPlugin.js | 143 +--- schemas/WebpackOptions.json | 4 + test/Stats.test.js | 6 + test/__snapshots__/Cli.test.js.snap | 13 + .../__snapshots__/StatsTestCases.test.js.snap | 722 +++++++++--------- test/helpers/captureStdio.js | 2 +- .../context-independence/webpack.config.js | 3 + .../statsCases/related-assets/chunk-style.css | 3 + test/statsCases/related-assets/chunk.js | 1 + test/statsCases/related-assets/index.js | 3 + test/statsCases/related-assets/style.css | 3 + .../related-assets/webpack.config.js | 100 +++ types.d.ts | 5 + 16 files changed, 612 insertions(+), 508 deletions(-) create mode 100644 test/statsCases/related-assets/chunk-style.css create mode 100644 test/statsCases/related-assets/chunk.js create mode 100644 test/statsCases/related-assets/index.js create mode 100644 test/statsCases/related-assets/style.css create mode 100644 test/statsCases/related-assets/webpack.config.js diff --git a/declarations/WebpackOptions.d.ts b/declarations/WebpackOptions.d.ts index 4440b0226f7..587866a3281 100644 --- a/declarations/WebpackOptions.d.ts +++ b/declarations/WebpackOptions.d.ts @@ -1954,6 +1954,10 @@ export interface StatsOptions { * Add information about the reasons why modules are included. */ reasons?: boolean; + /** + * Add information about assets that are related to other assets (like SourceMaps for assets). + */ + relatedAssets?: boolean; /** * Add information about runtime modules. */ diff --git a/lib/stats/DefaultStatsFactoryPlugin.js b/lib/stats/DefaultStatsFactoryPlugin.js index c9b48205713..20903945757 100644 --- a/lib/stats/DefaultStatsFactoryPlugin.js +++ b/lib/stats/DefaultStatsFactoryPlugin.js @@ -39,6 +39,8 @@ const identifierUtils = require("../util/identifier"); /** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ /** @typedef {import("./StatsFactory")} StatsFactory */ +/** @typedef {Asset & { type: string, related: ExtendedAsset[] }} ExtendedAsset */ + /** * @typedef {Object} UsualContext * @property {string} type @@ -75,7 +77,7 @@ const identifierUtils = require("../util/identifier"); /** * @typedef {Object} SimpleExtractors * @property {ExtractorsByOption} compilation - * @property {ExtractorsByOption} asset + * @property {ExtractorsByOption} asset * @property {ExtractorsByOption<{ name: string, chunkGroup: ChunkGroup }>} chunkGroup * @property {ExtractorsByOption} module * @property {ExtractorsByOption} moduleIssuer @@ -256,7 +258,6 @@ const SIMPLE_EXTRACTORS = { }, assets: (object, compilation, context, options, factory) => { const { type } = context; - const array = compilation.getAssets(); /** @type {Map} */ const compilationFileToChunks = new Map(); /** @type {Map} */ @@ -279,12 +280,42 @@ const SIMPLE_EXTRACTORS = { array.push(chunk); } } - object.assets = factory.create(`${type}.assets`, array, { + /** @type {Map} */ + const assetMap = new Map(); + const assets = new Set(); + for (const asset of compilation.getAssets()) { + const item = { + ...asset, + type: "asset", + related: undefined + }; + assets.add(item); + assetMap.set(asset.name, item); + } + for (const item of assetMap.values()) { + const related = item.info.related; + if (!related) continue; + for (const type of Object.keys(related)) { + const relatedEntry = related[type]; + const deps = Array.isArray(relatedEntry) + ? relatedEntry + : [relatedEntry]; + for (const dep of deps) { + const depItem = assetMap.get(dep); + if (!depItem) continue; + assets.delete(depItem); + depItem.type = type; + item.related = item.related || []; + item.related.push(depItem); + } + } + } + object.assets = factory.create(`${type}.assets`, Array.from(assets), { ...context, compilationFileToChunks, compilationAuxiliaryFileToChunks }); - object.filteredAssets = array.length - object.assets.length; + object.filteredAssets = assets.size - object.assets.length; object.assetsByChunkName = {}; for (const asset of object.assets) { for (const name of asset.chunkNames) { @@ -498,6 +529,7 @@ const SIMPLE_EXTRACTORS = { asset, { compilation, compilationFileToChunks, compilationAuxiliaryFileToChunks } ) => { + object.type = asset.type; object.name = asset.name; object.size = asset.source.size(); const chunks = compilationFileToChunks.get(asset.name) || []; @@ -528,6 +560,18 @@ const SIMPLE_EXTRACTORS = { asset.name ); object.info = asset.info; + object.filteredRelated = asset.related ? asset.related.length : undefined; + }, + relatedAssets: (object, asset, context, options, factory) => { + const { type } = context; + object.related = factory.create( + `${type}.related`, + asset.related, + context + ); + object.filteredRelated = asset.related + ? asset.related.length - object.related.length + : undefined; }, ids: ( object, @@ -987,23 +1031,26 @@ const BASE_MODULES_FILTER = { } }; +const ASSETS_FILTER = { + excludeAssets: (asset, context, { excludeAssets }) => { + const ident = asset.name; + const excluded = excludeAssets.some(fn => fn(ident, asset)); + if (excluded) return false; + }, + "!cachedAssets": (asset, { compilation }) => { + if ( + !compilation.emittedAssets.has(asset.name) && + !compilation.comparedForEmitAssets.has(asset.name) + ) { + return false; + } + } +}; + /** @type {Record boolean | undefined>>} */ const FILTER = { - "compilation.assets": { - excludeAssets: (asset, context, { excludeAssets }) => { - const ident = asset.name; - const excluded = excludeAssets.some(fn => fn(ident, asset)); - if (excluded) return false; - }, - "!cachedAssets": (asset, { compilation }) => { - if ( - !compilation.emittedAssets.has(asset.name) && - !compilation.comparedForEmitAssets.has(asset.name) - ) { - return false; - } - } - }, + "compilation.assets": ASSETS_FILTER, + "asset.related": ASSETS_FILTER, "compilation.modules": { excludeModules: EXCLUDE_MODULES_FILTER("module"), "!orphanModules": (module, { compilation: { chunkGraph } }) => { @@ -1192,6 +1239,15 @@ const sortByField = field => { return sortFn; }; +const ASSET_SORTERS = { + assetsSort: (comparators, context, { assetsSort }) => { + comparators.push(sortByField(assetsSort)); + }, + _: comparators => { + comparators.push(compareSelect(a => a.name, compareIds)); + } +}; + /** @type {Record void>>} */ const RESULT_SORTERS = { "compilation.chunks": { @@ -1219,14 +1275,8 @@ const RESULT_SORTERS = { comparators.push(sortByField(nestedModulesSort)); } }, - "compilation.assets": { - assetsSort: (comparators, context, { assetsSort }) => { - comparators.push(sortByField(assetsSort)); - }, - _: comparators => { - comparators.push(compareSelect(a => a.name, compareIds)); - } - } + "compilation.assets": ASSET_SORTERS, + "asset.related": ASSET_SORTERS }; /** @@ -1270,6 +1320,7 @@ const ITEM_NAMES = { "chunk.origins[]": "chunkOrigin", "compilation.chunks[]": "chunk", "compilation.assets[]": "asset", + "asset.related[]": "asset", "module.issuerPath[]": "moduleIssuer", "module.reasons[]": "moduleReason", "module.modules[]": "module", diff --git a/lib/stats/DefaultStatsPresetPlugin.js b/lib/stats/DefaultStatsPresetPlugin.js index 3ca0e766904..62c6138bc7b 100644 --- a/lib/stats/DefaultStatsPresetPlugin.js +++ b/lib/stats/DefaultStatsPresetPlugin.js @@ -20,6 +20,7 @@ const applyDefaults = (options, defaults) => { const NAMED_PRESETS = { verbose: { + relatedAssets: true, entrypoints: true, chunkGroups: true, ids: true, @@ -45,6 +46,7 @@ const NAMED_PRESETS = { maxModules: Infinity }, detailed: { + relatedAssets: true, entrypoints: true, chunkGroups: true, ids: true, @@ -133,6 +135,7 @@ const DEFAULTS = { return true; }, nestedModules: OFF_FOR_TO_STRING, + relatedAssets: OFF_FOR_TO_STRING, orphanModules: NORMAL_OFF, moduleAssets: OFF_FOR_TO_STRING, depth: OFF_FOR_TO_STRING, diff --git a/lib/stats/DefaultStatsPrinterPlugin.js b/lib/stats/DefaultStatsPrinterPlugin.js index 23e15ed13ce..eabefa91174 100644 --- a/lib/stats/DefaultStatsPrinterPlugin.js +++ b/lib/stats/DefaultStatsPrinterPlugin.js @@ -144,6 +144,7 @@ const SIMPLE_PRINTERS = { "compilation.children[].compilation.name": name => name ? `Child ${name}:` : "Child", + "asset.type": type => type, "asset.name": (name, { formatFilename, asset: { isOverSizeLimit } }) => formatFilename(name, isOverSizeLimit), "asset.size": ( @@ -165,6 +166,15 @@ const SIMPLE_PRINTERS = { hotModuleReplacement, { green, formatFlag } ) => (hotModuleReplacement ? green(formatFlag("hmr")) : undefined), + "asset.separator!": () => "\n", + "asset.filteredRelated": (filteredRelated, { asset: { related } }) => + filteredRelated > 0 + ? `${ + related && related.length > 0 + ? ` + ${filteredRelated} hidden` + : filteredRelated + } ${plural(filteredRelated, "related asset", "related assets")}` + : undefined, assetChunk: (id, { formatChunkId }) => formatChunkId(id), @@ -479,6 +489,7 @@ const ITEM_NAMES = { "compilation.warnings[]": "error", "compilation.logging[]": "loggingGroup", "compilation.children[]": "compilation", + "asset.related[]": "asset", "asset.chunks[]": "assetChunk", "asset.auxiliaryChunks[]": "assetChunk", "asset.chunkNames[]": "assetChunkName", @@ -544,6 +555,7 @@ const PREFERRED_ORDERS = { "needAdditionalPass" ], asset: [ + "type", "name", "size", "chunks", @@ -555,7 +567,9 @@ const PREFERRED_ORDERS = { "chunkNames", "auxiliaryChunkNames", "chunkIdHints", - "auxiliaryChunkIdHints" + "auxiliaryChunkIdHints", + "related", + "filteredChildren" ], "asset.info": ["immutable", "development", "hotModuleReplacement"], chunkGroup: [ @@ -692,10 +706,12 @@ const SIMPLE_ITEMS_JOINER = { "chunkGroup.childAssets[].children": itemsJoinOneLine, "asset.chunks": itemsJoinComma, "asset.auxiliaryChunks": itemsJoinCommaBrackets, - "asset.chunkNames": itemsJoinComma, - "asset.auxiliaryChunkNames": itemsJoinCommaBrackets, - "asset.chunkIdHints": itemsJoinComma, - "asset.auxiliaryChunkIdHints": itemsJoinCommaBrackets, + "asset.chunkNames": itemsJoinCommaBracketsWithName("name"), + "asset.auxiliaryChunkNames": itemsJoinCommaBracketsWithName("auxiliary name"), + "asset.chunkIdHints": itemsJoinCommaBracketsWithName("id hint"), + "asset.auxiliaryChunkIdHints": itemsJoinCommaBracketsWithName( + "auxiliary id hint" + ), "module.chunks": itemsJoinOneLine, "module.issuerPath": items => items @@ -769,14 +785,16 @@ const indent = (str, prefix, noPrefixInFirstLine) => { const joinExplicitNewLine = (items, indenter) => { let firstInLine = true; + let first = true; return items .map(item => { if (!item.content) return; - let content = indent(item.content, indenter, !firstInLine); + let content = indent(item.content, first ? "" : indenter, !firstInLine); if (firstInLine) { content = content.replace(/^\n+/, ""); } if (!content) return; + first = false; const noJoiner = firstInLine || content.startsWith("\n"); firstInLine = content.endsWith("\n"); return noJoiner ? content : " " + content; @@ -812,6 +830,18 @@ const SIMPLE_ELEMENT_JOINERS = { if (lastNeedMore) result.push("\n"); return result.join(""); }, + asset: items => + joinExplicitNewLine( + items.map(item => { + if (item.element === "related" && item.content) { + return { + content: `\n${item.content}\n` + }; + } + return item; + }), + " " + ), "asset.info": joinOneLine, module: (items, { module, maxModuleId }) => { let hasName = false; @@ -980,56 +1010,6 @@ const createOrder = (array, preferredOrder) => { return array; }; -const filterColors = value => value.replace(/\u001b\[\d+m/g, ""); - -const table = (array, align, splitter) => { - const rows = array.length; - const cols = array[0].length; - const colSizes = new Array(cols); - for (let col = 0; col < cols; col++) { - colSizes[col] = 0; - } - // measure content - for (let row = 1; row < rows; row++) { - for (let col = 0; col < cols; col++) { - const value = filterColors(`${array[row][col]}`); - if (value.length > colSizes[col]) { - colSizes[col] = value.length; - } - } - } - // measure headers - for (let col = 0; col < cols; col++) { - const value = filterColors(`${array[0][col]}`); - if (colSizes[col] > 0 && value.length > colSizes[col]) { - colSizes[col] = value.length; - } - } - const lines = []; - for (let row = 0; row < rows; row++) { - let str = ""; - for (let col = 0; col < cols; col++) { - if (colSizes[col] === 0) continue; - const value = `${array[row][col]}`; - let l = filterColors(value).length; - if (align[col] === "l") { - str += value; - } - for (; l < colSizes[col] && col !== cols - 1; l++) { - str += " "; - } - if (align[col] === "r") { - str += value; - } - if (col + 1 < cols && colSizes[col] !== 0) { - str += splitter || " "; - } - } - lines.push(str.trimRight()); - } - return lines.join("\n"); -}; - class DefaultStatsPrinterPlugin { /** * Apply the plugin @@ -1117,57 +1097,6 @@ class DefaultStatsPrinterPlugin { .for(key) .tap("DefaultStatsPrinterPlugin", modifier); } - - // Print assets as table - stats.hooks.printElements - .for("compilation.assets[].asset") - .tap("DefaultStatsPrinterPlugin", (elements, { formatFlag }) => { - const elementsMap = elements.reduce( - (obj, e) => ((obj[e.element] = e.content), obj), - Object.create(null) - ); - const chunkNames = [ - elementsMap.chunkNames, - elementsMap.auxiliaryChunkNames - ] - .filter(Boolean) - .join(" "); - const idHints = [ - elementsMap.chunkIdHints, - elementsMap.auxiliaryChunkIdHints - ] - .filter(Boolean) - .join(" "); - return [ - elementsMap.name || "", - elementsMap.size || "", - [elementsMap.chunks, elementsMap.auxiliaryChunks] - .filter(Boolean) - .join(" "), - [ - elementsMap.emitted, - elementsMap.comparedForEmit, - elementsMap.info - ] - .filter(Boolean) - .join(" "), - elementsMap.isOverSizeLimit || "", - [ - chunkNames && formatFlag(`name: ${chunkNames}`), - idHints && formatFlag(`id hint: ${idHints}`) - ] - .filter(Boolean) - .join(" ") - ]; - }); - stats.hooks.printItems - .for("compilation.assets") - .tap("DefaultStatsPrinterPlugin", (items, { bold }) => { - if (items.length === 0) return undefined; - let header = ["Asset", "Size", "Chunks", "", "", ""]; - header = header.map(h => (h ? bold(h) : h)); - return table([header].concat(items), "rrrlll"); - }); } ); }); diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 7b4a47437c4..607c3ac8345 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -3064,6 +3064,10 @@ "description": "Add information about the reasons why modules are included.", "type": "boolean" }, + "relatedAssets": { + "description": "Add information about assets that are related to other assets (like SourceMaps for assets).", + "type": "boolean" + }, "runtime": { "description": "Add information about runtime modules.", "type": "boolean" diff --git a/test/Stats.test.js b/test/Stats.test.js index 2cc58ab531e..94941f7874c 100644 --- a/test/Stats.test.js +++ b/test/Stats.test.js @@ -186,11 +186,13 @@ describe("Stats", () => { ], "comparedForEmit": false, "emitted": true, + "filteredRelated": undefined, "info": Object { "size": 111, }, "name": "chunkB.js", "size": 111, + "type": "asset", }, Object { "auxiliaryChunkIdHints": Array [], @@ -201,11 +203,13 @@ describe("Stats", () => { ], "comparedForEmit": false, "emitted": true, + "filteredRelated": undefined, "info": Object { "size": 182, }, "name": "entryA.js", "size": 182, + "type": "asset", }, Object { "auxiliaryChunkIdHints": Array [], @@ -216,11 +220,13 @@ describe("Stats", () => { ], "comparedForEmit": false, "emitted": true, + "filteredRelated": undefined, "info": Object { "size": 2153, }, "name": "entryB.js", "size": 2153, + "type": "asset", }, ], "assetsByChunkName": Object { diff --git a/test/__snapshots__/Cli.test.js.snap b/test/__snapshots__/Cli.test.js.snap index 2def1960564..be59e739aac 100644 --- a/test/__snapshots__/Cli.test.js.snap +++ b/test/__snapshots__/Cli.test.js.snap @@ -4319,6 +4319,19 @@ Object { "multiple": false, "simpleType": "boolean", }, + "stats-related-assets": Object { + "configs": Array [ + Object { + "description": "Add information about assets that are related to other assets (like SourceMaps for assets).", + "multiple": false, + "path": "stats.relatedAssets", + "type": "boolean", + }, + ], + "description": "Add information about assets that are related to other assets (like SourceMaps for assets).", + "multiple": false, + "simpleType": "boolean", + }, "stats-runtime": Object { "configs": Array [ Object { diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index fce2b7748c7..5cc596ebd94 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -7,11 +7,10 @@ Child fitting: Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size - fitting-1374ef9a0c77486d23a9.js 1.91 KiB [emitted] [immutable] - fitting-39acefe48eb2df23eed8.js 1.08 KiB [emitted] [immutable] - fitting-4e5c288606e3e5a3a6f4.js 1.91 KiB [emitted] [immutable] - fitting-611749b41e250810f8c2.js 14.1 KiB [emitted] [immutable] + asset fitting-1374ef9a0c77486d23a9.js 1.91 KiB [emitted] [immutable] + asset fitting-39acefe48eb2df23eed8.js 1.08 KiB [emitted] [immutable] + asset fitting-4e5c288606e3e5a3a6f4.js 1.91 KiB [emitted] [immutable] + asset fitting-611749b41e250810f8c2.js 14.1 KiB [emitted] [immutable] Entrypoint main = fitting-4e5c288606e3e5a3a6f4.js fitting-1374ef9a0c77486d23a9.js fitting-611749b41e250810f8c2.js chunk (runtime: main) fitting-611749b41e250810f8c2.js 1.87 KiB (javascript) 7.23 KiB (runtime) [entry] [rendered] > ./index main @@ -35,11 +34,10 @@ Child content-change: Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size - content-change-1374ef9a0c77486d23a9.js 1.91 KiB [emitted] [immutable] - content-change-39acefe48eb2df23eed8.js 1.08 KiB [emitted] [immutable] - content-change-4e5c288606e3e5a3a6f4.js 1.91 KiB [emitted] [immutable] - content-change-e66d82480692ac31ac19.js 14.1 KiB [emitted] [immutable] + asset content-change-1374ef9a0c77486d23a9.js 1.91 KiB [emitted] [immutable] + asset content-change-39acefe48eb2df23eed8.js 1.08 KiB [emitted] [immutable] + asset content-change-4e5c288606e3e5a3a6f4.js 1.91 KiB [emitted] [immutable] + asset content-change-e66d82480692ac31ac19.js 14.1 KiB [emitted] [immutable] Entrypoint main = content-change-4e5c288606e3e5a3a6f4.js content-change-1374ef9a0c77486d23a9.js content-change-e66d82480692ac31ac19.js chunk (runtime: main) content-change-e66d82480692ac31ac19.js 1.87 KiB (javascript) 7.24 KiB (runtime) [entry] [rendered] > ./index main @@ -65,19 +63,18 @@ exports[`StatsTestCases should print correct stats for aggressive-splitting-on-d Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size -04b2ca47666368125165.js 10.1 KiB [emitted] [immutable] [name: main] -1374ef9a0c77486d23a9.js 1.91 KiB [emitted] [immutable] -18415200589074bd3a5e.js 1.91 KiB [emitted] [immutable] -217435676bee126dd94a.js 1.91 KiB [emitted] [immutable] -5c315d7e5a35993e7afe.js 1.91 KiB [emitted] [immutable] -786fbfba25c2f3010e51.js 1010 bytes [emitted] [immutable] -9aff9f1168d78838fe34.js 1.91 KiB [emitted] [immutable] -b1762d5699dc2b186def.js 1010 bytes [emitted] [immutable] -cce7b4dd6f1ee6cbd7ab.js 1.91 KiB [emitted] [immutable] -e4a37cc77b83fdcdec26.js 1.91 KiB [emitted] [immutable] -e550f9d6698a321d0006.js 1.91 KiB [emitted] [immutable] -f113873e44814db5d11c.js 1010 bytes [emitted] [immutable] +asset 04b2ca47666368125165.js 10.1 KiB [emitted] [immutable] (name: main) +asset 1374ef9a0c77486d23a9.js 1.91 KiB [emitted] [immutable] +asset 18415200589074bd3a5e.js 1.91 KiB [emitted] [immutable] +asset 217435676bee126dd94a.js 1.91 KiB [emitted] [immutable] +asset 5c315d7e5a35993e7afe.js 1.91 KiB [emitted] [immutable] +asset 786fbfba25c2f3010e51.js 1010 bytes [emitted] [immutable] +asset 9aff9f1168d78838fe34.js 1.91 KiB [emitted] [immutable] +asset b1762d5699dc2b186def.js 1010 bytes [emitted] [immutable] +asset cce7b4dd6f1ee6cbd7ab.js 1.91 KiB [emitted] [immutable] +asset e4a37cc77b83fdcdec26.js 1.91 KiB [emitted] [immutable] +asset e550f9d6698a321d0006.js 1.91 KiB [emitted] [immutable] +asset f113873e44814db5d11c.js 1010 bytes [emitted] [immutable] Entrypoint main = 04b2ca47666368125165.js chunk (runtime: main) 1374ef9a0c77486d23a9.js 1.76 KiB [rendered] [recorded] aggressive splitted > ./c ./d ./e ./index.js 3:0-30 @@ -134,10 +131,9 @@ exports[`StatsTestCases should print correct stats for asset 1`] = ` "Hash: d01313eb91b38a5d67bf Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [name: (main)] - bundle.js 10.9 KiB [emitted] [name: main] - static/file.html 12 bytes [emitted] [name: (main)] +asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] (auxiliary name: main) +asset bundle.js 10.9 KiB [emitted] (name: main) +asset static/file.html 12 bytes [emitted] (auxiliary name: main) Entrypoint main = bundle.js (89a353e9c515885abd8e.png static/file.html) ./index.js 150 bytes [built] ./images/file.png 42 bytes (javascript) 14.6 KiB (asset) [built] @@ -455,9 +451,8 @@ exports[`StatsTestCases should print correct stats for chunk-module-id-range 1`] Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size -main1.js 4.39 KiB [emitted] [name: main1] -main2.js 4.38 KiB [emitted] [name: main2] +asset main1.js 4.39 KiB [emitted] (name: main1) +asset main2.js 4.38 KiB [emitted] (name: main2) Entrypoint main1 = main1.js Entrypoint main2 = main2.js chunk main1.js (main1) 136 bytes (javascript) 668 bytes (runtime) [entry] [rendered] @@ -483,11 +478,10 @@ exports[`StatsTestCases should print correct stats for chunks 1`] = ` Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size -460.bundle.js 324 bytes [emitted] -524.bundle.js 210 bytes [emitted] -996.bundle.js 142 bytes [emitted] - bundle.js 8.62 KiB [emitted] [name: main] +asset 460.bundle.js 324 bytes [emitted] +asset 524.bundle.js 210 bytes [emitted] +asset 996.bundle.js 142 bytes [emitted] +asset bundle.js 8.62 KiB [emitted] (name: main) Entrypoint main = bundle.js chunk (runtime: main) bundle.js (main) 73 bytes (javascript) 4.8 KiB (runtime) >{460}< >{996}< [entry] [rendered] > ./index main @@ -527,11 +521,10 @@ exports[`StatsTestCases should print correct stats for chunks-development 1`] = Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size - b_js.bundle.js 901 bytes [emitted] - bundle.js 9.7 KiB [emitted] [name: main] - c_js.bundle.js 1.1 KiB [emitted] -d_js-e_js.bundle.js 1.25 KiB [emitted] +asset b_js.bundle.js 901 bytes [emitted] +asset bundle.js 9.7 KiB [emitted] (name: main) +asset c_js.bundle.js 1.1 KiB [emitted] +asset d_js-e_js.bundle.js 1.25 KiB [emitted] Entrypoint main = bundle.js chunk b_js.bundle.js 22 bytes <{main}> [rendered] > ./b ./index.js 2:0-16 @@ -584,8 +577,7 @@ exports[`StatsTestCases should print correct stats for color-disabled 1`] = ` "Hash: d9ddedcfb5ebf871962d Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 54 bytes [emitted] [name: main] +asset main.js 54 bytes [emitted] (name: main) Entrypoint main = main.js ./index.js 1 bytes [built]" `; @@ -594,8 +586,7 @@ exports[`StatsTestCases should print correct stats for color-enabled 1`] = ` "Hash: d9ddedcfb5ebf871962d Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 54 bytes [emitted] [name: main] +asset main.js 54 bytes [emitted] (name: main) Entrypoint main = main.js ./index.js 1 bytes [built]" `; @@ -604,8 +595,7 @@ exports[`StatsTestCases should print correct stats for color-enabled-custom 1`] "Hash: d9ddedcfb5ebf871962d Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 54 bytes [emitted] [name: main] +asset main.js 54 bytes [emitted] (name: main) Entrypoint main = main.js ./index.js 1 bytes [built]" `; @@ -614,9 +604,8 @@ exports[`StatsTestCases should print correct stats for commons-chunk-min-size-0 "Hash: 57e47b29eca9382a28eb Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 429.js 278 bytes [emitted] [id hint: vendor-1] -entry-1.js 5.59 KiB [emitted] [name: entry-1] +asset 429.js 278 bytes [emitted] (id hint: vendor-1) +asset entry-1.js 5.59 KiB [emitted] (name: entry-1) Entrypoint entry-1 = 429.js entry-1.js ./entry-1.js 145 bytes [built] ./modules/a.js 22 bytes [built] @@ -632,9 +621,8 @@ exports[`StatsTestCases should print correct stats for commons-chunk-min-size-In "Hash: b129ef5f1729131c018b Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - entry-1.js 5.59 KiB [emitted] [name: entry-1] -vendor-1.js 278 bytes [emitted] [name: vendor-1] [id hint: vendor-1] +asset entry-1.js 5.59 KiB [emitted] (name: entry-1) +asset vendor-1.js 278 bytes [emitted] (name: vendor-1) (id hint: vendor-1) Entrypoint entry-1 = vendor-1.js entry-1.js ./entry-1.js 145 bytes [built] ./modules/a.js 22 bytes [built] @@ -652,9 +640,8 @@ Child Hash: 5ca8e5bdfb2b754a3bd4 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - app.5754ea36a444df9ecf20-1.js 6.13 KiB [emitted] [immutable] [name: app] - vendor.6331e1e5bb052a2d93d2-1.js 615 bytes [emitted] [immutable] [name: vendor] [id hint: vendor] + asset app.5754ea36a444df9ecf20-1.js 6.13 KiB [emitted] [immutable] (name: app) + asset vendor.6331e1e5bb052a2d93d2-1.js 615 bytes [emitted] [immutable] (name: vendor) (id hint: vendor) Entrypoint app = vendor.6331e1e5bb052a2d93d2-1.js app.5754ea36a444df9ecf20-1.js ./entry-1.js + 2 modules 185 bytes [built] ./constants.js 87 bytes [built] @@ -663,9 +650,8 @@ Child Hash: e5172f49e6b338c5313f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - app.7a4016963f7fce69dd46-2.js 6.14 KiB [emitted] [immutable] [name: app] - vendor.6331e1e5bb052a2d93d2-2.js 615 bytes [emitted] [immutable] [name: vendor] [id hint: vendor] + asset app.7a4016963f7fce69dd46-2.js 6.14 KiB [emitted] [immutable] (name: app) + asset vendor.6331e1e5bb052a2d93d2-2.js 615 bytes [emitted] [immutable] (name: vendor) (id hint: vendor) Entrypoint app = vendor.6331e1e5bb052a2d93d2-2.js app.7a4016963f7fce69dd46-2.js ./entry-2.js + 2 modules 192 bytes [built] ./constants.js 87 bytes [built] @@ -697,11 +683,10 @@ Child Hash: 6e3fc7728f25b55a6bf4 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 664-043fbd8be36fa319ab6c.js 457 bytes [emitted] [immutable] - 664-043fbd8be36fa319ab6c.js.map 344 bytes [emitted] [dev] - main-40cae482dd9570d95478.js 8.9 KiB [emitted] [immutable] [name: main] - main-40cae482dd9570d95478.js.map 7.9 KiB [emitted] [dev] [name: (main)] + asset 664-043fbd8be36fa319ab6c.js 457 bytes [emitted] [immutable] + sourceMap 664-043fbd8be36fa319ab6c.js.map 344 bytes [emitted] [dev] + asset main-40cae482dd9570d95478.js 8.9 KiB [emitted] [immutable] (name: main) + sourceMap main-40cae482dd9570d95478.js.map 7.9 KiB [emitted] [dev] (auxiliary name: main) Entrypoint main = main-40cae482dd9570d95478.js (main-40cae482dd9570d95478.js.map) ./a/index.js 40 bytes [built] ./a/chunk.js + 1 modules 66 bytes [built] @@ -710,11 +695,10 @@ Child Hash: 6e3fc7728f25b55a6bf4 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 664-043fbd8be36fa319ab6c.js 457 bytes [emitted] [immutable] - 664-043fbd8be36fa319ab6c.js.map 344 bytes [emitted] [dev] - main-40cae482dd9570d95478.js 8.9 KiB [emitted] [immutable] [name: main] - main-40cae482dd9570d95478.js.map 7.9 KiB [emitted] [dev] [name: (main)] + asset 664-043fbd8be36fa319ab6c.js 457 bytes [emitted] [immutable] + sourceMap 664-043fbd8be36fa319ab6c.js.map 344 bytes [emitted] [dev] + asset main-40cae482dd9570d95478.js 8.9 KiB [emitted] [immutable] (name: main) + sourceMap main-40cae482dd9570d95478.js.map 7.9 KiB [emitted] [dev] (auxiliary name: main) Entrypoint main = main-40cae482dd9570d95478.js (main-40cae482dd9570d95478.js.map) ./b/index.js 40 bytes [built] ./b/chunk.js + 1 modules 66 bytes [built] @@ -723,9 +707,8 @@ Child Hash: b9ba7b288a18e9c3b4d8 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 664-0e84ac43488fb30906e6.js 1.51 KiB [emitted] [immutable] - main-21f21dd156dba3381861.js 9.79 KiB [emitted] [immutable] [name: main] + asset 664-0e84ac43488fb30906e6.js 1.51 KiB [emitted] [immutable] + asset main-21f21dd156dba3381861.js 9.79 KiB [emitted] [immutable] (name: main) Entrypoint main = main-21f21dd156dba3381861.js ./a/index.js 40 bytes [built] ./a/chunk.js + 1 modules 66 bytes [built] @@ -734,9 +717,8 @@ Child Hash: b9ba7b288a18e9c3b4d8 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 664-0e84ac43488fb30906e6.js 1.51 KiB [emitted] [immutable] - main-21f21dd156dba3381861.js 9.79 KiB [emitted] [immutable] [name: main] + asset 664-0e84ac43488fb30906e6.js 1.51 KiB [emitted] [immutable] + asset main-21f21dd156dba3381861.js 9.79 KiB [emitted] [immutable] (name: main) Entrypoint main = main-21f21dd156dba3381861.js ./b/index.js 40 bytes [built] ./b/chunk.js + 1 modules 66 bytes [built] @@ -749,24 +731,21 @@ Child Hash: 1d73b2cf3f5118743df9 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 123.js 1.3 KiB [emitted] [name: main] + asset 123.js 1.3 KiB [emitted] (name: main) Entrypoint main = 123.js ./index.js 24 bytes [built] Child Hash: d698b26d9faf1f3a6d32 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 321.js 1.3 KiB [emitted] [name: main] + asset 321.js 1.3 KiB [emitted] (name: main) Entrypoint main = 321.js ./index.js 24 bytes [built] Child Hash: d5f16a5e688fd12554f8 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - both.js 1.3 KiB [emitted] [name: main] + asset both.js 1.3 KiB [emitted] (name: main) Entrypoint main = both.js ./index.js 24 bytes [built]" `; @@ -775,8 +754,7 @@ exports[`StatsTestCases should print correct stats for dll-reference-plugin-issu "Hash: f8d62f11e4150ca20303 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -bundle.js 83 bytes [emitted] [name: main] +asset bundle.js 83 bytes [emitted] (name: main) Entrypoint main = bundle.js ./entry.js 29 bytes [built]" `; @@ -799,9 +777,8 @@ exports[`StatsTestCases should print correct stats for entry-filename 1`] = ` Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) -Asset Size - a.js 1.3 KiB [emitted] [name: a] - c.js 1.3 KiB [emitted] [name: b] +asset a.js 1.3 KiB [emitted] (name: a) +asset c.js 1.3 KiB [emitted] (name: b) Entrypoint a = a.js Entrypoint b = c.js chunk (runtime: b) c.js (b) 22 bytes [entry] [rendered] @@ -822,8 +799,7 @@ exports[`StatsTestCases should print correct stats for exclude-with-loader 1`] = "Hash: 347fe270ce8f37d1300b Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -bundle.js 3.73 KiB [emitted] [name: main] +asset bundle.js 3.73 KiB [emitted] (name: main) + 1 hidden asset Entrypoint main = bundle.js (89245aae14d2d745f85a29195aa6ffc1.json) ./index.js 77 bytes [built] @@ -835,8 +811,7 @@ exports[`StatsTestCases should print correct stats for external 1`] = ` "Hash: bf56adb9620d5c608324 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 1.2 KiB [emitted] [name: main] +asset main.js 1.2 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js 17 bytes [built] external \\"test\\" 42 bytes [built]" @@ -848,8 +823,7 @@ Child undefined: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle0.js 556 bytes [emitted] [name: main] + asset bundle0.js 556 bytes [emitted] (name: main) Entrypoint main = bundle0.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -878,50 +852,43 @@ Child Terser: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle1.js 556 bytes [emitted] [name: main] + asset bundle1.js 556 bytes [emitted] (name: main) Entrypoint main = bundle1.js Child /Terser/: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle2.js 556 bytes [emitted] [name: main] + asset bundle2.js 556 bytes [emitted] (name: main) Entrypoint main = bundle2.js Child warnings => true: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle3.js 556 bytes [emitted] [name: main] + asset bundle3.js 556 bytes [emitted] (name: main) Entrypoint main = bundle3.js Child [Terser]: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle4.js 556 bytes [emitted] [name: main] + asset bundle4.js 556 bytes [emitted] (name: main) Entrypoint main = bundle4.js Child [/Terser/]: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle5.js 556 bytes [emitted] [name: main] + asset bundle5.js 556 bytes [emitted] (name: main) Entrypoint main = bundle5.js Child [warnings => true]: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle6.js 556 bytes [emitted] [name: main] + asset bundle6.js 556 bytes [emitted] (name: main) Entrypoint main = bundle6.js Child should not filter: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle7.js 556 bytes [emitted] [name: main] + asset bundle7.js 556 bytes [emitted] (name: main) Entrypoint main = bundle7.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -950,8 +917,7 @@ Child /should not filter/: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle8.js 556 bytes [emitted] [name: main] + asset bundle8.js 556 bytes [emitted] (name: main) Entrypoint main = bundle8.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -980,8 +946,7 @@ Child warnings => false: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle9.js 556 bytes [emitted] [name: main] + asset bundle9.js 556 bytes [emitted] (name: main) Entrypoint main = bundle9.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -1010,8 +975,7 @@ Child [should not filter]: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle10.js 556 bytes [emitted] [name: main] + asset bundle10.js 556 bytes [emitted] (name: main) Entrypoint main = bundle10.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -1040,8 +1004,7 @@ Child [/should not filter/]: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle11.js 556 bytes [emitted] [name: main] + asset bundle11.js 556 bytes [emitted] (name: main) Entrypoint main = bundle11.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -1070,8 +1033,7 @@ Child [warnings => false]: Hash: ce07045a2e545aaa7cc0 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle12.js 556 bytes [emitted] [name: main] + asset bundle12.js 556 bytes [emitted] (name: main) Entrypoint main = bundle12.js WARNING in Terser Plugin: Dropping unused function someRemoteUnUsedFunction1 [webpack://./a.js:3,0] @@ -1192,20 +1154,18 @@ chunk trees.js (trees) 71 bytes [rendered] `; exports[`StatsTestCases should print correct stats for immutable 1`] = ` -" Asset Size -e09555841c507fee7ed0.js 11.1 KiB [emitted] [immutable] [name: main] -ee94cfeadae09cde6d3b.js 888 bytes [emitted] [immutable]" +"asset e09555841c507fee7ed0.js 11.1 KiB [emitted] [immutable] (name: main) +asset ee94cfeadae09cde6d3b.js 888 bytes [emitted] [immutable]" `; exports[`StatsTestCases should print correct stats for import-context-filter 1`] = ` "Hash: 2c737c124c5cb965196e Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 398.js 484 bytes [emitted] - 544.js 484 bytes [emitted] - 718.js 484 bytes [emitted] -entry.js 10.3 KiB [emitted] [name: entry] +asset 398.js 484 bytes [emitted] +asset 544.js 484 bytes [emitted] +asset 718.js 484 bytes [emitted] +asset entry.js 10.3 KiB [emitted] (name: entry) Entrypoint entry = entry.js ./entry.js 450 bytes [built] ./templates lazy ^\\\\.\\\\/.*$ include: \\\\.js$ exclude: \\\\.noimport\\\\.js$ namespace object 160 bytes [optional] [built] @@ -1219,9 +1179,8 @@ exports[`StatsTestCases should print correct stats for import-weak 1`] = ` "Hash: d5d1d2d93f7f21d7891f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 836.js 142 bytes [emitted] -entry.js 10.9 KiB [emitted] [name: entry] +asset 836.js 142 bytes [emitted] +asset entry.js 10.9 KiB [emitted] (name: entry) Entrypoint entry = entry.js ./entry.js 120 bytes [built] ./modules/b.js 22 bytes [built] @@ -1258,10 +1217,9 @@ Child Hash: 3eae6ad466eee5023523 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - a-all-a_js-f07dda80f0c3fd0769a3.js 144 bytes [emitted] [immutable] [id hint: all] - a-main-77f459b6cbc51e3f5925.js 100 bytes [emitted] [immutable] [name: main] - a-runtime~main-0939cac12732288c82c4.js 5.15 KiB [emitted] [immutable] [name: runtime~main] + asset a-all-a_js-f07dda80f0c3fd0769a3.js 144 bytes [emitted] [immutable] (id hint: all) + asset a-main-77f459b6cbc51e3f5925.js 100 bytes [emitted] [immutable] (name: main) + asset a-runtime~main-0939cac12732288c82c4.js 5.15 KiB [emitted] [immutable] (name: runtime~main) Entrypoint main = a-runtime~main-0939cac12732288c82c4.js a-all-a_js-f07dda80f0c3fd0769a3.js a-main-77f459b6cbc51e3f5925.js ./a.js 18 bytes [built] + 2 hidden modules @@ -1269,11 +1227,10 @@ Child Hash: 4a94310f47a24503d79b Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - b-all-b_js-b9ed42e0a8062ba939ca.js 479 bytes [emitted] [immutable] [id hint: all] - b-main-c19f05608cd70b4132a5.js 133 bytes [emitted] [immutable] [name: main] - b-runtime~main-d3a58fcead889bd27258.js 6.08 KiB [emitted] [immutable] [name: runtime~main] - b-vendors-node_modules_vendor_js-b5e50d21fb0ad3547860.js 189 bytes [emitted] [immutable] [id hint: vendors] + asset b-all-b_js-b9ed42e0a8062ba939ca.js 479 bytes [emitted] [immutable] (id hint: all) + asset b-main-c19f05608cd70b4132a5.js 133 bytes [emitted] [immutable] (name: main) + asset b-runtime~main-d3a58fcead889bd27258.js 6.08 KiB [emitted] [immutable] (name: runtime~main) + asset b-vendors-node_modules_vendor_js-b5e50d21fb0ad3547860.js 189 bytes [emitted] [immutable] (id hint: vendors) Entrypoint main = b-runtime~main-d3a58fcead889bd27258.js b-vendors-node_modules_vendor_js-b5e50d21fb0ad3547860.js b-all-b_js-b9ed42e0a8062ba939ca.js b-main-c19f05608cd70b4132a5.js ./b.js 17 bytes [built] ./node_modules/vendor.js 23 bytes [built] @@ -1282,12 +1239,11 @@ Child Hash: b52a872565203b899f7c Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - c-all-b_js-17aadd5e28f79d5d8b74.js 506 bytes [emitted] [immutable] [id hint: all] - c-all-c_js-6ae1d6c960821c92d2f7.js 397 bytes [emitted] [immutable] [id hint: all] - c-main-089ed20cf4ee2fd7a626.js 592 bytes [emitted] [immutable] [name: main] - c-runtime~main-292815ebf55c05156ca7.js 12.4 KiB [emitted] [immutable] [name: runtime~main] - c-vendors-node_modules_vendor_js-b5e50d21fb0ad3547860.js 189 bytes [emitted] [immutable] [id hint: vendors] + asset c-all-b_js-17aadd5e28f79d5d8b74.js 506 bytes [emitted] [immutable] (id hint: all) + asset c-all-c_js-6ae1d6c960821c92d2f7.js 397 bytes [emitted] [immutable] (id hint: all) + asset c-main-089ed20cf4ee2fd7a626.js 592 bytes [emitted] [immutable] (name: main) + asset c-runtime~main-292815ebf55c05156ca7.js 12.4 KiB [emitted] [immutable] (name: runtime~main) + asset c-vendors-node_modules_vendor_js-b5e50d21fb0ad3547860.js 189 bytes [emitted] [immutable] (id hint: vendors) Entrypoint main = c-runtime~main-292815ebf55c05156ca7.js c-all-c_js-6ae1d6c960821c92d2f7.js c-main-089ed20cf4ee2fd7a626.js (prefetch: c-vendors-node_modules_vendor_js-b5e50d21fb0ad3547860.js c-all-b_js-17aadd5e28f79d5d8b74.js) ./c.js 61 bytes [built] ./b.js 17 bytes [built] @@ -1301,8 +1257,7 @@ Child 1 chunks: Hash: 5aee87dc8d9478b6c84e Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - bundle1.js 4.14 KiB [emitted] [name: main] + asset bundle1.js 4.14 KiB [emitted] (name: main) Entrypoint main = bundle1.js chunk (runtime: main) bundle1.js (main) 219 bytes (javascript) 1.32 KiB (runtime) <{179}> >{179}< [entry] [rendered] ./a.js 22 bytes [built] @@ -1316,9 +1271,8 @@ Child 2 chunks: Hash: 4fb40b0ee23de37d1493 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 459.bundle2.js 666 bytes [emitted] [name: c] - bundle2.js 10.5 KiB [emitted] [name: main] + asset 459.bundle2.js 666 bytes [emitted] (name: c) + asset bundle2.js 10.5 KiB [emitted] (name: main) Entrypoint main = bundle2.js chunk (runtime: main) bundle2.js (main) 101 bytes (javascript) 6.03 KiB (runtime) >{459}< [entry] [rendered] ./index.js 101 bytes [built] @@ -1333,10 +1287,9 @@ Child 3 chunks: Hash: 3d890788a42a7c29daf8 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 459.bundle3.js 530 bytes [emitted] [name: c] - 524.bundle3.js 210 bytes [emitted] - bundle3.js 10.5 KiB [emitted] [name: main] + asset 459.bundle3.js 530 bytes [emitted] (name: c) + asset 524.bundle3.js 210 bytes [emitted] + asset bundle3.js 10.5 KiB [emitted] (name: main) Entrypoint main = bundle3.js chunk (runtime: main) bundle3.js (main) 101 bytes (javascript) 6.03 KiB (runtime) >{459}< [entry] [rendered] ./index.js 101 bytes [built] @@ -1352,11 +1305,10 @@ Child 4 chunks: Hash: 89c9004242083a4b9c51 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 394.bundle4.js 210 bytes [emitted] - 459.bundle4.js 394 bytes [emitted] [name: c] - 524.bundle4.js 210 bytes [emitted] - bundle4.js 10.5 KiB [emitted] [name: main] + asset 394.bundle4.js 210 bytes [emitted] + asset 459.bundle4.js 394 bytes [emitted] (name: c) + asset 524.bundle4.js 210 bytes [emitted] + asset bundle4.js 10.5 KiB [emitted] (name: main) Entrypoint main = bundle4.js chunk (runtime: main) bundle4.js (main) 101 bytes (javascript) 6.03 KiB (runtime) >{394}< >{459}< [entry] [rendered] ./index.js 101 bytes [built] @@ -1376,8 +1328,7 @@ exports[`StatsTestCases should print correct stats for logging 1`] = ` Hash: 09e9cdba4dccbdc50b80 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 54 bytes [emitted] [name: main] +asset main.js 54 bytes [emitted] (name: main) Entrypoint main = main.js ./index.js 1 bytes [built] @@ -1417,8 +1368,7 @@ exports[`StatsTestCases should print correct stats for max-modules 1`] = ` "Hash: 378aa023f22ef731b46f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 5.29 KiB [emitted] [name: main] +asset main.js 5.29 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js 181 bytes [built] ./a.js?1 33 bytes [built] @@ -1447,8 +1397,7 @@ exports[`StatsTestCases should print correct stats for max-modules-default 1`] = "Hash: 378aa023f22ef731b46f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 5.29 KiB [emitted] [name: main] +asset main.js 5.29 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js 181 bytes [built] ./a.js?1 33 bytes [built] @@ -1472,12 +1421,11 @@ exports[`StatsTestCases should print correct stats for module-assets 1`] = ` "Hash: ce886feeaa7eb41fcc51 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 1.png 21 KiB [emitted] [name: (a)] - 2.png 21 KiB [emitted] [name: (a, b)] - a.js 753 bytes [emitted] [name: a] - b.js 571 bytes [emitted] [name: b] -main.js 8.93 KiB [emitted] [name: main] +asset 1.png 21 KiB [emitted] (auxiliary name: a) +asset 2.png 21 KiB [emitted] (auxiliary name: a, b) +asset a.js 753 bytes [emitted] (name: a) +asset b.js 571 bytes [emitted] (name: b) +asset main.js 8.93 KiB [emitted] (name: main) Entrypoint main = main.js Chunk Group a = a.js (1.png 2.png) Chunk Group b = b.js (2.png) @@ -1498,16 +1446,15 @@ chunk (runtime: main) a.js (a) 134 bytes [rendered] `; exports[`StatsTestCases should print correct stats for module-deduplication 1`] = ` -" Asset Size -114.js 681 bytes [emitted] -172.js 734 bytes [emitted] -326.js 734 bytes [emitted] -593.js 681 bytes [emitted] -716.js 681 bytes [emitted] -923.js 734 bytes [emitted] - e1.js 11 KiB [emitted] [name: e1] - e2.js 11 KiB [emitted] [name: e2] - e3.js 11 KiB [emitted] [name: e3] +"asset 114.js 681 bytes [emitted] +asset 172.js 734 bytes [emitted] +asset 326.js 734 bytes [emitted] +asset 593.js 681 bytes [emitted] +asset 716.js 681 bytes [emitted] +asset 923.js 734 bytes [emitted] +asset e1.js 11 KiB [emitted] (name: e1) +asset e2.js 11 KiB [emitted] (name: e2) +asset e3.js 11 KiB [emitted] (name: e3) Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1550,13 +1497,12 @@ chunk (runtime: e2, e3) 923.js 37 bytes [rendered] `; exports[`StatsTestCases should print correct stats for module-deduplication-named 1`] = ` -" Asset Size -async1.js 839 bytes [emitted] [name: async1] -async2.js 839 bytes [emitted] [name: async2] -async3.js 839 bytes [emitted] [name: async3] - e1.js 10.9 KiB [emitted] [name: e1] - e2.js 10.9 KiB [emitted] [name: e2] - e3.js 10.9 KiB [emitted] [name: e3] +"asset async1.js 839 bytes [emitted] (name: async1) +asset async2.js 839 bytes [emitted] (name: async2) +asset async3.js 839 bytes [emitted] (name: async3) +asset e1.js 10.9 KiB [emitted] (name: e1) +asset e2.js 10.9 KiB [emitted] (name: e2) +asset e3.js 10.9 KiB [emitted] (name: e3) Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1621,8 +1567,7 @@ exports[`StatsTestCases should print correct stats for module-reasons 1`] = ` "Hash: 5b3984e2f81fb7967ced Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 1.32 KiB [emitted] [name: main] +asset main.js 1.32 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js + 2 modules 102 bytes [built] entry ./index main @@ -1743,9 +1688,8 @@ exports[`StatsTestCases should print correct stats for named-chunks-plugin 1`] = "Hash: 5fe284b745929a265f10 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - entry.js 5.46 KiB [emitted] [name: entry] -vendor.js 241 bytes [emitted] [name: vendor] [id hint: vendor] +asset entry.js 5.46 KiB [emitted] (name: entry) +asset vendor.js 241 bytes [emitted] (name: vendor) (id hint: vendor) Entrypoint entry = vendor.js entry.js ./entry.js 72 bytes [built] ./modules/a.js 22 bytes [built] @@ -1758,10 +1702,9 @@ exports[`StatsTestCases should print correct stats for named-chunks-plugin-async "Hash: d5ee52b51e7099cebe1f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - entry.js 10.4 KiB [emitted] [name: entry] -modules_a_js.js 316 bytes [emitted] -modules_b_js.js 153 bytes [emitted] +asset entry.js 10.4 KiB [emitted] (name: entry) +asset modules_a_js.js 316 bytes [emitted] +asset modules_b_js.js 153 bytes [emitted] Entrypoint entry = entry.js ./entry.js 47 bytes [built] ./modules/a.js 37 bytes [built] @@ -1787,15 +1730,14 @@ exports[`StatsTestCases should print correct stats for optimize-chunks 1`] = ` "Hash: 7127537292f08fdb35ab Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size Chunks - ab.js 153 bytes {90} [emitted] [name: ab] - abd.js 197 bytes {90}, {374} [emitted] [name: abd] - ac in ab.js 114 bytes {753} [emitted] [name: ac in ab] - chunk.js 158 bytes {284}, {753} [emitted] [name: chunk] - cir1.js 334 bytes {592} [emitted] [name: cir1] -cir2 from cir1.js 378 bytes {288}, {289} [emitted] [name: cir2 from cir1] - cir2.js 334 bytes {289} [emitted] [name: cir2] - main.js 9.42 KiB {179} [emitted] [name: main] +asset ab.js 153 bytes {90} [emitted] (name: ab) +asset abd.js 197 bytes {90}, {374} [emitted] (name: abd) +asset ac in ab.js 114 bytes {753} [emitted] (name: ac in ab) +asset chunk.js 158 bytes {284}, {753} [emitted] (name: chunk) +asset cir1.js 334 bytes {592} [emitted] (name: cir1) +asset cir2 from cir1.js 378 bytes {288}, {289} [emitted] (name: cir2 from cir1) +asset cir2.js 334 bytes {289} [emitted] (name: cir2) +asset main.js 9.42 KiB {179} [emitted] (name: main) Entrypoint main = main.js chunk {90} (runtime: main) ab.js (ab) 2 bytes <{179}> >{753}< [rendered] > [10] ./index.js 1:0-6:8 @@ -1858,8 +1800,7 @@ Child Hash: c759f77b83bd8bc7df4a Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - warning.pro-web.js 294 KiB [emitted] [big] [name: main] + asset warning.pro-web.js 294 KiB [emitted] [big] (name: main) Entrypoint main [big] = warning.pro-web.js ./index.js 293 KiB [built] @@ -1881,8 +1822,7 @@ Child Hash: c759f77b83bd8bc7df4a Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - warning.pro-webworker.js 294 KiB [emitted] [big] [name: main] + asset warning.pro-webworker.js 294 KiB [emitted] [big] (name: main) Entrypoint main [big] = warning.pro-webworker.js ./index.js 293 KiB [built] @@ -1904,40 +1844,35 @@ Child Hash: c759f77b83bd8bc7df4a Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - no-warning.pro-node.js 294 KiB [emitted] [name: main] + asset no-warning.pro-node.js 294 KiB [emitted] (name: main) Entrypoint main = no-warning.pro-node.js ./index.js 293 KiB [built] Child Hash: c32aa75af113466f2279 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - no-warning.dev-web.js 1.72 MiB [emitted] [name: main] + asset no-warning.dev-web.js 1.72 MiB [emitted] (name: main) Entrypoint main = no-warning.dev-web.js ./index.js 293 KiB [built] Child Hash: c32aa75af113466f2279 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - no-warning.dev-node.js 1.72 MiB [emitted] [name: main] + asset no-warning.dev-node.js 1.72 MiB [emitted] (name: main) Entrypoint main = no-warning.dev-node.js ./index.js 293 KiB [built] Child Hash: c32aa75af113466f2279 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - no-warning.dev-web-with-limit-set.js 1.72 MiB [emitted] [big] [name: main] + asset no-warning.dev-web-with-limit-set.js 1.72 MiB [emitted] [big] (name: main) Entrypoint main [big] = no-warning.dev-web-with-limit-set.js ./index.js 293 KiB [built] Child Hash: c759f77b83bd8bc7df4a Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - warning.pro-node-with-hints-set.js 294 KiB [emitted] [big] [name: main] + asset warning.pro-node-with-hints-set.js 294 KiB [emitted] [big] (name: main) Entrypoint main [big] = warning.pro-node-with-hints-set.js ./index.js 293 KiB [built] @@ -1960,11 +1895,10 @@ Child exports[`StatsTestCases should print correct stats for performance-disabled 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 460.js 324 bytes [emitted] - 524.js 210 bytes [emitted] - 996.js 142 bytes [emitted] -main.js 302 KiB [emitted] [name: main] +asset 460.js 324 bytes [emitted] +asset 524.js 210 bytes [emitted] +asset 996.js 142 bytes [emitted] +asset main.js 302 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js 52 bytes [built] ./a.js 293 KiB [built] @@ -1978,11 +1912,10 @@ Entrypoint main = main.js exports[`StatsTestCases should print correct stats for performance-error 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 460.js 324 bytes [emitted] - 524.js 210 bytes [emitted] - 996.js 142 bytes [emitted] -main.js 302 KiB [emitted] [big] [name: main] +asset 460.js 324 bytes [emitted] +asset 524.js 210 bytes [emitted] +asset 996.js 142 bytes [emitted] +asset main.js 302 KiB [emitted] [big] (name: main) Entrypoint main [big] = main.js ./index.js 52 bytes [built] ./a.js 293 KiB [built] @@ -2008,9 +1941,8 @@ Entrypoints: exports[`StatsTestCases should print correct stats for performance-no-async-chunks-shown 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 294 KiB [emitted] [big] [name: main] - sec.js 1.36 KiB [emitted] [name: sec] +asset main.js 294 KiB [emitted] [big] (name: main) +asset sec.js 1.36 KiB [emitted] (name: sec) Entrypoint main [big] = main.js Entrypoint sec = sec.js ./index.js 32 bytes [built] @@ -2040,11 +1972,10 @@ For more info visit https://webpack.js.org/guides/code-splitting/ exports[`StatsTestCases should print correct stats for performance-no-hints 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 460.js 324 bytes [emitted] - 524.js 210 bytes [emitted] - 996.js 142 bytes [emitted] -main.js 302 KiB [emitted] [big] [name: main] +asset 460.js 324 bytes [emitted] +asset 524.js 210 bytes [emitted] +asset 996.js 142 bytes [emitted] +asset main.js 302 KiB [emitted] [big] (name: main) Entrypoint main [big] = main.js ./index.js 52 bytes [built] ./a.js 293 KiB [built] @@ -2058,9 +1989,8 @@ Entrypoint main [big] = main.js< exports[`StatsTestCases should print correct stats for performance-oversize-limit-error 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 294 KiB [emitted] [big] [name: main] - sec.js 294 KiB [emitted] [big] [name: sec] +asset main.js 294 KiB [emitted] [big] (name: main) +asset sec.js 294 KiB [emitted] [big] (name: sec) Entrypoint main [big] = main.js Entrypoint sec [big] = sec.js ./index.js 16 bytes [built] @@ -2088,14 +2018,13 @@ For more info visit https://webpack.js.org/guides/code-splitting/ `; exports[`StatsTestCases should print correct stats for prefetch 1`] = ` -" Asset Size - inner.js 114 bytes [emitted] [name: inner] - inner2.js 154 bytes [emitted] [name: inner2] - main.js 13.8 KiB [emitted] [name: main] - normal.js 113 bytes [emitted] [name: normal] - prefetched.js 557 bytes [emitted] [name: prefetched] -prefetched2.js 114 bytes [emitted] [name: prefetched2] -prefetched3.js 114 bytes [emitted] [name: prefetched3] +"asset inner.js 114 bytes [emitted] (name: inner) +asset inner2.js 154 bytes [emitted] (name: inner2) +asset main.js 13.8 KiB [emitted] (name: main) +asset normal.js 113 bytes [emitted] (name: normal) +asset prefetched.js 557 bytes [emitted] (name: prefetched) +asset prefetched2.js 114 bytes [emitted] (name: prefetched2) +asset prefetched3.js 114 bytes [emitted] (name: prefetched3) Entrypoint main = main.js (prefetch: prefetched2.js prefetched.js prefetched3.js) chunk (runtime: main) normal.js (normal) 1 bytes <{179}> [rendered] chunk (runtime: main) main.js (main) 436 bytes (javascript) 7.45 KiB (runtime) >{30}< >{220}< >{379}< >{505}< (prefetch: {379} {505} {220}) [entry] [rendered] @@ -2121,14 +2050,13 @@ chunk (runtime: main) b2.js (b2) 1 bytes <{128}> [rendered]" `; exports[`StatsTestCases should print correct stats for preload 1`] = ` -" Asset Size - inner.js 114 bytes [emitted] [name: inner] - inner2.js 154 bytes [emitted] [name: inner2] - main.js 13.1 KiB [emitted] [name: main] - normal.js 113 bytes [emitted] [name: normal] - preloaded.js 557 bytes [emitted] [name: preloaded] -preloaded2.js 113 bytes [emitted] [name: preloaded2] -preloaded3.js 112 bytes [emitted] [name: preloaded3] +"asset inner.js 114 bytes [emitted] (name: inner) +asset inner2.js 154 bytes [emitted] (name: inner2) +asset main.js 13.1 KiB [emitted] (name: main) +asset normal.js 113 bytes [emitted] (name: normal) +asset preloaded.js 557 bytes [emitted] (name: preloaded) +asset preloaded2.js 113 bytes [emitted] (name: preloaded2) +asset preloaded3.js 112 bytes [emitted] (name: preloaded3) Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) chunk (runtime: main) normal.js (normal) 1 bytes [rendered] chunk (runtime: main) main.js (main) 424 bytes (javascript) 7.27 KiB (runtime) (preload: {363} {851} {355}) [entry] [rendered] @@ -2152,11 +2080,10 @@ Hash: 26557f4913a8fca1792d Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size Chunks - 460.js 324 bytes {460} [emitted] - 524.js 210 bytes {524} [emitted] - 996.js 142 bytes {996} [emitted] -main.js 8.62 KiB {179} [emitted] [name: main] +asset 460.js 324 bytes {460} [emitted] +asset 524.js 210 bytes {524} [emitted] +asset 996.js 142 bytes {996} [emitted] +asset main.js 8.62 KiB {179} [emitted] (name: main) Entrypoint main = main.js chunk {179} (runtime: main) main.js (main) 73 bytes (javascript) 4.79 KiB (runtime) >{460}< >{996}< [entry] [rendered] > ./index main @@ -2279,11 +2206,10 @@ exports[`StatsTestCases should print correct stats for preset-normal 1`] = ` Hash: 26557f4913a8fca1792d Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 460.js 324 bytes [emitted] - 524.js 210 bytes [emitted] - 996.js 142 bytes [emitted] -main.js 8.62 KiB [emitted] [name: main] +asset 460.js 324 bytes [emitted] +asset 524.js 210 bytes [emitted] +asset 996.js 142 bytes [emitted] +asset main.js 8.62 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js 51 bytes [built] ./a.js 22 bytes [built] @@ -2304,11 +2230,10 @@ LOG from LogTestPlugin exports[`StatsTestCases should print correct stats for preset-normal-performance 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 460.js 324 bytes [emitted] - 524.js 210 bytes [emitted] - 996.js 142 bytes [emitted] -main.js 302 KiB [emitted] [big] [name: main] +asset 460.js 324 bytes [emitted] +asset 524.js 210 bytes [emitted] +asset 996.js 142 bytes [emitted] +asset main.js 302 KiB [emitted] [big] (name: main) Entrypoint main [big] = main.js ./index.js 52 bytes [built] ./a.js 293 KiB [built] @@ -2334,15 +2259,10 @@ Entrypoints: exports[`StatsTestCases should print correct stats for preset-normal-performance-ensure-filter-sourcemaps 1`] = ` "Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 460.js 356 bytes [emitted] - 460.js.map 212 bytes [emitted] [dev] - 524.js 242 bytes [emitted] - 524.js.map 218 bytes [emitted] [dev] - 996.js 174 bytes [emitted] - 996.js.map 158 bytes [emitted] [dev] - main.js 302 KiB [emitted] [big] [name: main] -main.js.map 1.72 MiB [emitted] [dev] [name: (main)] +asset 460.js 356 bytes [emitted] 1 related asset +asset 524.js 242 bytes [emitted] 1 related asset +asset 996.js 174 bytes [emitted] 1 related asset +asset main.js 302 KiB [emitted] [big] (name: main) 1 related asset Entrypoint main [big] = main.js (main.js.map) ./index.js 52 bytes [built] ./a.js 293 KiB [built] @@ -2381,11 +2301,10 @@ Hash: 26557f4913a8fca1792d Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size Chunks - 460.js 324 bytes {460} [emitted] - 524.js 210 bytes {524} [emitted] - 996.js 142 bytes {996} [emitted] -main.js 8.62 KiB {179} [emitted] [name: main] +asset 460.js 324 bytes {460} [emitted] +asset 524.js 210 bytes {524} [emitted] +asset 996.js 142 bytes {996} [emitted] +asset main.js 8.62 KiB {179} [emitted] (name: main) Entrypoint main = main.js chunk {179} (runtime: main) main.js (main) 73 bytes (javascript) 4.79 KiB (runtime) >{460}< >{996}< [entry] [rendered] > ./index main @@ -2543,12 +2462,88 @@ LOG from ModuleConcatenationPlugin " `; +exports[`StatsTestCases should print correct stats for related-assets 1`] = ` +"Child default: + asset default-chunk_js.css 73 bytes [emitted] 3 related assets + asset default-chunk_js.js 1.12 KiB [emitted] 3 related assets + asset default-main.css 69 bytes [emitted] (name: main) 3 related assets + asset default-main.js 13.3 KiB [emitted] (name: main) 3 related assets +Child relatedAssets: + asset relatedAssets-chunk_js.css 79 bytes [emitted] + compressed relatedAssets-chunk_js.css.br 79 bytes [emitted] + compressed relatedAssets-chunk_js.css.gz 79 bytes [emitted] + sourceMap relatedAssets-chunk_js.css.map 197 bytes [emitted] [dev] + compressed relatedAssets-chunk_js.css.map.br 197 bytes [emitted] + compressed relatedAssets-chunk_js.css.map.gz 197 bytes [emitted] + asset relatedAssets-chunk_js.js 1.12 KiB [emitted] + compressed relatedAssets-chunk_js.js.br 1.12 KiB [emitted] + compressed relatedAssets-chunk_js.js.gz 1.12 KiB [emitted] + sourceMap relatedAssets-chunk_js.js.map 295 bytes [emitted] [dev] + compressed relatedAssets-chunk_js.js.map.br 295 bytes [emitted] + compressed relatedAssets-chunk_js.js.map.gz 295 bytes [emitted] + asset relatedAssets-main.css 75 bytes [emitted] (name: main) + compressed relatedAssets-main.css.br 75 bytes [emitted] + compressed relatedAssets-main.css.gz 75 bytes [emitted] + sourceMap relatedAssets-main.css.map 187 bytes [emitted] [dev] (auxiliary name: main) + compressed relatedAssets-main.css.map.br 187 bytes [emitted] + compressed relatedAssets-main.css.map.gz 187 bytes [emitted] + asset relatedAssets-main.js 13.3 KiB [emitted] (name: main) + compressed relatedAssets-main.js.br 13.3 KiB [emitted] + compressed relatedAssets-main.js.gz 13.3 KiB [emitted] + sourceMap relatedAssets-main.js.map 11.3 KiB [emitted] [dev] (auxiliary name: main) + compressed relatedAssets-main.js.map.br 11.3 KiB [emitted] + compressed relatedAssets-main.js.map.gz 11.3 KiB [emitted] +Child exclude1: + asset exclude1-chunk_js.css 74 bytes [emitted] + sourceMap exclude1-chunk_js.css.map 192 bytes [emitted] [dev] 2 related assets + + 2 hidden related assets + asset exclude1-chunk_js.js 1.12 KiB [emitted] + sourceMap exclude1-chunk_js.js.map 290 bytes [emitted] [dev] 2 related assets + + 2 hidden related assets + asset exclude1-main.css 70 bytes [emitted] (name: main) + sourceMap exclude1-main.css.map 182 bytes [emitted] [dev] (auxiliary name: main) 2 related assets + + 2 hidden related assets + asset exclude1-main.js 13.3 KiB [emitted] (name: main) + sourceMap exclude1-main.js.map 11.3 KiB [emitted] [dev] (auxiliary name: main) 2 related assets + + 2 hidden related assets +Child exclude2: + asset exclude2-chunk_js.css 74 bytes [emitted] + compressed exclude2-chunk_js.css.br 74 bytes [emitted] + compressed exclude2-chunk_js.css.gz 74 bytes [emitted] + + 1 hidden related asset + asset exclude2-chunk_js.js 1.12 KiB [emitted] + compressed exclude2-chunk_js.js.br 1.12 KiB [emitted] + compressed exclude2-chunk_js.js.gz 1.12 KiB [emitted] + + 1 hidden related asset + asset exclude2-main.css 70 bytes [emitted] (name: main) + compressed exclude2-main.css.br 70 bytes [emitted] + compressed exclude2-main.css.gz 70 bytes [emitted] + + 1 hidden related asset + asset exclude2-main.js 13.3 KiB [emitted] (name: main) + compressed exclude2-main.js.br 13.3 KiB [emitted] + compressed exclude2-main.js.gz 13.3 KiB [emitted] + + 1 hidden related asset +Child exclude3: + asset exclude3-main.css 70 bytes [emitted] (name: main) + compressed exclude3-main.css.br 70 bytes [emitted] + compressed exclude3-main.css.gz 70 bytes [emitted] + sourceMap exclude3-main.css.map 182 bytes [emitted] [dev] (auxiliary name: main) + compressed exclude3-main.css.map.br 182 bytes [emitted] + compressed exclude3-main.css.map.gz 182 bytes [emitted] + asset exclude3-main.js 13.3 KiB [emitted] (name: main) + compressed exclude3-main.js.br 13.3 KiB [emitted] + compressed exclude3-main.js.gz 13.3 KiB [emitted] + sourceMap exclude3-main.js.map 11.3 KiB [emitted] [dev] (auxiliary name: main) + compressed exclude3-main.js.map.br 11.3 KiB [emitted] + compressed exclude3-main.js.map.gz 11.3 KiB [emitted] + + 2 hidden assets" +`; + exports[`StatsTestCases should print correct stats for resolve-plugin-context 1`] = ` "Hash: 165b336ff24d1e54cefe Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -bundle.js 1.5 KiB [emitted] [name: main] +asset bundle.js 1.5 KiB [emitted] (name: main) Entrypoint main = bundle.js ./index.js 48 bytes [built] ./node_modules/abc/index.js 16 bytes [built] @@ -2561,8 +2556,7 @@ exports[`StatsTestCases should print correct stats for reverse-sort-modules 1`] "Hash: 378aa023f22ef731b46f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 5.29 KiB [emitted] [name: main] +asset main.js 5.29 KiB [emitted] (name: main) Entrypoint main = main.js ./index.js 181 bytes [built] ./a.js?1 33 bytes [built] @@ -2594,10 +2588,9 @@ Entrypoint e2 = runtime~e2.js e2.js" exports[`StatsTestCases should print correct stats for runtime-chunk-integration 1`] = ` "Child base: - Asset Size - without-505.js 1.22 KiB [emitted] - without-main1.js 597 bytes [emitted] [name: main1] - without-runtime.js 10.9 KiB [emitted] [name: runtime] + asset without-505.js 1.22 KiB [emitted] + asset without-main1.js 597 bytes [emitted] (name: main1) + asset without-runtime.js 10.9 KiB [emitted] (name: runtime) Entrypoint main1 = without-runtime.js without-main1.js ./main1.js 66 bytes [built] ./b.js 20 bytes [built] @@ -2605,12 +2598,11 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration ./d.js 20 bytes [built] + 8 hidden modules Child static custom name: - Asset Size - with-505.js 1.22 KiB [emitted] - with-main1.js 597 bytes [emitted] [name: main1] - with-main2.js 216 bytes [emitted] [name: main2] - with-main3.js 216 bytes [emitted] [name: main3] - with-manifest.js 10.9 KiB [emitted] [name: manifest] + asset with-505.js 1.22 KiB [emitted] + asset with-main1.js 597 bytes [emitted] (name: main1) + asset with-main2.js 216 bytes [emitted] (name: main2) + asset with-main3.js 216 bytes [emitted] (name: main3) + asset with-manifest.js 10.9 KiB [emitted] (name: manifest) Entrypoint main1 = with-manifest.js with-main1.js Entrypoint main2 = with-manifest.js with-main2.js Entrypoint main3 = with-manifest.js with-main3.js @@ -2622,13 +2614,12 @@ Child static custom name: ./d.js 20 bytes [built] + 8 hidden modules Child dynamic custom name: - Asset Size - func-505.js 1.22 KiB [emitted] - func-a.js 5.14 KiB [emitted] [name: a] - func-b.js 10.9 KiB [emitted] [name: b] - func-main1.js 597 bytes [emitted] [name: main1] - func-main2.js 216 bytes [emitted] [name: main2] - func-main3.js 216 bytes [emitted] [name: main3] + asset func-505.js 1.22 KiB [emitted] + asset func-a.js 5.14 KiB [emitted] (name: a) + asset func-b.js 10.9 KiB [emitted] (name: b) + asset func-main1.js 597 bytes [emitted] (name: main1) + asset func-main2.js 216 bytes [emitted] (name: main2) + asset func-main3.js 216 bytes [emitted] (name: main3) Entrypoint main1 = func-b.js func-main1.js Entrypoint main2 = func-b.js func-main2.js Entrypoint main3 = func-a.js func-main3.js @@ -2657,15 +2648,14 @@ Child production: Hash: 02965664270efb6b89d7 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - production-a.js 11.5 KiB [emitted] [name: a] - production-b.js 11.5 KiB [emitted] [name: b] - production-c.js 63 bytes [emitted] [name: c] - production-dw_js-_a6170.js 1.17 KiB [emitted] - production-dw_js-_a6171.js 1.17 KiB [emitted] - production-dx_js.js 1.17 KiB [emitted] - production-dy_js.js 1.14 KiB [emitted] - production-dz_js.js 1.14 KiB [emitted] + asset production-a.js 11.5 KiB [emitted] (name: a) + asset production-b.js 11.5 KiB [emitted] (name: b) + asset production-c.js 63 bytes [emitted] (name: c) + asset production-dw_js-_a6170.js 1.17 KiB [emitted] + asset production-dw_js-_a6171.js 1.17 KiB [emitted] + asset production-dx_js.js 1.17 KiB [emitted] + asset production-dy_js.js 1.14 KiB [emitted] + asset production-dz_js.js 1.14 KiB [emitted] Entrypoint a = production-a.js Entrypoint b = production-b.js Entrypoint c = production-c.js @@ -2741,14 +2731,13 @@ Child development: Hash: b71442f9953065638c6d Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - development-a.js 16.6 KiB [emitted] [name: a] - development-b.js 16.6 KiB [emitted] [name: b] - development-c.js 806 bytes [emitted] [name: c] - development-dw_js.js 3.1 KiB [emitted] - development-dx_js.js 3.1 KiB [emitted] - development-dy_js.js 3.1 KiB [emitted] - development-dz_js.js 3.1 KiB [emitted] + asset development-a.js 16.6 KiB [emitted] (name: a) + asset development-b.js 16.6 KiB [emitted] (name: b) + asset development-c.js 806 bytes [emitted] (name: c) + asset development-dw_js.js 3.1 KiB [emitted] + asset development-dx_js.js 3.1 KiB [emitted] + asset development-dy_js.js 3.1 KiB [emitted] + asset development-dz_js.js 3.1 KiB [emitted] Entrypoint a = development-a.js Entrypoint b = development-b.js Entrypoint c = development-c.js @@ -2828,14 +2817,13 @@ Child global: Hash: f506f5ccb4ef082c5b54 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - global-a.js 11.7 KiB [emitted] [name: a] - global-b.js 11.7 KiB [emitted] [name: b] - global-c.js 63 bytes [emitted] [name: c] - global-dw_js.js 1.17 KiB [emitted] - global-dx_js.js 1.17 KiB [emitted] - global-dy_js.js 1.17 KiB [emitted] - global-dz_js.js 1.17 KiB [emitted] + asset global-a.js 11.7 KiB [emitted] (name: a) + asset global-b.js 11.7 KiB [emitted] (name: b) + asset global-c.js 63 bytes [emitted] (name: c) + asset global-dw_js.js 1.17 KiB [emitted] + asset global-dx_js.js 1.17 KiB [emitted] + asset global-dy_js.js 1.17 KiB [emitted] + asset global-dz_js.js 1.17 KiB [emitted] Entrypoint a = global-a.js Entrypoint b = global-b.js Entrypoint c = global-c.js @@ -2986,9 +2974,8 @@ exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1 "Hash: 9b9895c7791fc9fa6b64 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - 1.js 642 bytes [emitted] -main.js 10.7 KiB [emitted] [name: main] +asset 1.js 642 bytes [emitted] +asset main.js 10.7 KiB [emitted] (name: main) Entrypoint main = main.js ./main.js + 1 modules 221 bytes [built] [no exports used] @@ -3047,8 +3034,7 @@ Child Hash: 584bbadef99167e48f78 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - main.js 207 bytes [emitted] [name: main] + asset main.js 207 bytes [emitted] (name: main) Entrypoint main = main.js ./index.js + 2 modules 1.18 KiB [built] [no exports] @@ -3069,8 +3055,7 @@ Child Hash: 01c4c80354460261d226 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - main.no-side.js 1.37 KiB [emitted] [name: main] + asset main.no-side.js 1.37 KiB [emitted] (name: main) Entrypoint main = main.no-side.js ./index.js 116 bytes [built] [no exports] @@ -3099,8 +3084,7 @@ exports[`StatsTestCases should print correct stats for side-effects-simple-unuse "Hash: 0de3e543740b7f84f27f Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -main.js 322 bytes [emitted] [name: main] +asset main.js 322 bytes [emitted] (name: main) Entrypoint main = main.js ./index.js + 2 modules 158 bytes [built] [no exports used] @@ -3147,8 +3131,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = ` "Hash: 9d4ddf959fe784660c5b Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -bundle.js 812 bytes [emitted] [name: main] +asset bundle.js 812 bytes [emitted] (name: main) Entrypoint main = bundle.js ./index.js 1 bytes [built]" `; @@ -3158,8 +3141,7 @@ exports[`StatsTestCases should print correct stats for simple-more-info 1`] = ` Time: X ms Built at: 1970-04-20 12:42:42 PublicPath: (none) - Asset Size -bundle.js 54 bytes [emitted] [name: main] +asset bundle.js 54 bytes [emitted] (name: main) Entrypoint main = bundle.js ./index.js 1 bytes [built] entry ./index main @@ -4187,11 +4169,10 @@ Child used-exports: Hash: 9773f96a2473b1745a37 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - used-exports-332.js 426 bytes [emitted] - used-exports-a.js 225 bytes [emitted] [name: a] - used-exports-b.js 5.92 KiB [emitted] [name: b] - used-exports-c.js 5.93 KiB [emitted] [name: c] + asset used-exports-332.js 426 bytes [emitted] + asset used-exports-a.js 225 bytes [emitted] (name: a) + asset used-exports-b.js 5.92 KiB [emitted] (name: b) + asset used-exports-c.js 5.93 KiB [emitted] (name: c) Entrypoint a = used-exports-a.js Entrypoint b = used-exports-332.js used-exports-b.js Entrypoint c = used-exports-332.js used-exports-c.js @@ -4209,11 +4190,10 @@ Child no-used-exports: Hash: a22ef43b3bf54ce83a06 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - no-used-exports-332.js 447 bytes [emitted] - no-used-exports-a.js 5.92 KiB [emitted] [name: a] - no-used-exports-b.js 5.92 KiB [emitted] [name: b] - no-used-exports-c.js 5.93 KiB [emitted] [name: c] + asset no-used-exports-332.js 447 bytes [emitted] + asset no-used-exports-a.js 5.92 KiB [emitted] (name: a) + asset no-used-exports-b.js 5.92 KiB [emitted] (name: b) + asset no-used-exports-c.js 5.93 KiB [emitted] (name: c) Entrypoint a = no-used-exports-332.js no-used-exports-a.js Entrypoint b = no-used-exports-332.js no-used-exports-b.js Entrypoint c = no-used-exports-332.js no-used-exports-c.js @@ -4232,11 +4212,10 @@ Child global: Hash: a22ef43b3bf54ce83a06 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size - global-332.js 447 bytes [emitted] - global-a.js 5.92 KiB [emitted] [name: a] - global-b.js 5.92 KiB [emitted] [name: b] - global-c.js 5.93 KiB [emitted] [name: c] + asset global-332.js 447 bytes [emitted] + asset global-a.js 5.92 KiB [emitted] (name: a) + asset global-b.js 5.92 KiB [emitted] (name: b) + asset global-c.js 5.93 KiB [emitted] (name: c) Entrypoint a = global-332.js global-a.js Entrypoint b = global-332.js global-b.js Entrypoint c = global-332.js global-c.js @@ -4257,8 +4236,7 @@ exports[`StatsTestCases should print correct stats for tree-shaking 1`] = ` "Hash: 86347bd8345fd44d4391 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -bundle.js 7.09 KiB [emitted] [name: main] +asset bundle.js 7.09 KiB [emitted] (name: main) Entrypoint main = bundle.js ./index.js 316 bytes [built] [1 warning] [no exports] @@ -4300,8 +4278,7 @@ exports[`StatsTestCases should print correct stats for warnings-terser 1`] = ` "Hash: 3edc6fa0be0cae472d04 Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -bundle.js 823 bytes [emitted] [name: main] +asset bundle.js 823 bytes [emitted] (name: main) Entrypoint main = bundle.js ./index.js 299 bytes [built] [no exports used] @@ -4325,19 +4302,18 @@ exports[`StatsTestCases should print correct stats for wasm-explorer-examples-sy "Hash: 2771dd94469a045536ab Time: X ms Built at: 1970-04-20 12:42:42 - Asset Size -0506579c50fa5de37901.module.wasm 531 bytes [emitted] [immutable] - 230.bundle.js 246 bytes [emitted] - 325.bundle.js 3.79 KiB [emitted] -444c8480a2d7f9f35db1.module.wasm 154 bytes [emitted] [immutable] -5179c03f2d41e1a5d004.module.wasm 154 bytes [emitted] [immutable] - 526.bundle.js 368 bytes [emitted] [id hint: vendors] - 780.bundle.js 573 bytes [emitted] -80ffdb4e517728b773b3.module.wasm 156 bytes [emitted] [immutable] - 99.bundle.js 244 bytes [emitted] -9cbd89d7e2621cc7fd42.module.wasm 120 bytes [emitted] [immutable] - bundle.js 11.7 KiB [emitted] [name: main] -f3b9cec74658e38fcaa0.module.wasm 290 bytes [emitted] [immutable] +asset 0506579c50fa5de37901.module.wasm 531 bytes [emitted] [immutable] +asset 230.bundle.js 246 bytes [emitted] +asset 325.bundle.js 3.79 KiB [emitted] +asset 444c8480a2d7f9f35db1.module.wasm 154 bytes [emitted] [immutable] +asset 5179c03f2d41e1a5d004.module.wasm 154 bytes [emitted] [immutable] +asset 526.bundle.js 368 bytes [emitted] (id hint: vendors) +asset 780.bundle.js 573 bytes [emitted] +asset 80ffdb4e517728b773b3.module.wasm 156 bytes [emitted] [immutable] +asset 99.bundle.js 244 bytes [emitted] +asset 9cbd89d7e2621cc7fd42.module.wasm 120 bytes [emitted] [immutable] +asset bundle.js 11.7 KiB [emitted] (name: main) +asset f3b9cec74658e38fcaa0.module.wasm 290 bytes [emitted] [immutable] Entrypoint main = bundle.js chunk (runtime: main) 99.bundle.js 50 bytes (javascript) 531 bytes (webassembly) [rendered] ./duff.wasm 50 bytes (javascript) 531 bytes (webassembly) [built] diff --git a/test/helpers/captureStdio.js b/test/helpers/captureStdio.js index 034a883bab2..2c04019e440 100644 --- a/test/helpers/captureStdio.js +++ b/test/helpers/captureStdio.js @@ -25,7 +25,7 @@ module.exports = (stdio, tty) => { toString: () => { return stripAnsi(logs.join("")).replace( - /\([^)]+\) (\[[^\]]+\]\s*)?DeprecationWarning.+(\n\(Use .node.+\))?(\n\s+at .*)*\n?/g, + /\([^)]+\) (\[[^\]]+\]\s*)?DeprecationWarning.+(\n\(Use .node.+\))?(\n(\s|BREAKING CHANGE).*)*(\n\s+at .*)*\n?/g, "" ); }, diff --git a/test/statsCases/context-independence/webpack.config.js b/test/statsCases/context-independence/webpack.config.js index 63f1fe4446d..0a48cae2bf1 100644 --- a/test/statsCases/context-independence/webpack.config.js +++ b/test/statsCases/context-independence/webpack.config.js @@ -12,6 +12,9 @@ const base = { options: {} } ] + }, + stats: { + relatedAssets: true } }; diff --git a/test/statsCases/related-assets/chunk-style.css b/test/statsCases/related-assets/chunk-style.css new file mode 100644 index 00000000000..c0dd09def3e --- /dev/null +++ b/test/statsCases/related-assets/chunk-style.css @@ -0,0 +1,3 @@ +.chunk { + color: red; +} diff --git a/test/statsCases/related-assets/chunk.js b/test/statsCases/related-assets/chunk.js new file mode 100644 index 00000000000..57e1b4712d0 --- /dev/null +++ b/test/statsCases/related-assets/chunk.js @@ -0,0 +1 @@ +import "./chunk-style.css"; diff --git a/test/statsCases/related-assets/index.js b/test/statsCases/related-assets/index.js new file mode 100644 index 00000000000..65cc16ec16e --- /dev/null +++ b/test/statsCases/related-assets/index.js @@ -0,0 +1,3 @@ +import "./style.css"; + +import("./chunk"); diff --git a/test/statsCases/related-assets/style.css b/test/statsCases/related-assets/style.css new file mode 100644 index 00000000000..f815695493b --- /dev/null +++ b/test/statsCases/related-assets/style.css @@ -0,0 +1,3 @@ +body { + color: green; +} diff --git a/test/statsCases/related-assets/webpack.config.js b/test/statsCases/related-assets/webpack.config.js new file mode 100644 index 00000000000..cf88569ccb4 --- /dev/null +++ b/test/statsCases/related-assets/webpack.config.js @@ -0,0 +1,100 @@ +const MCEP = require("mini-css-extract-plugin"); +const { Compilation } = require("../../../"); + +const compression = exts => compiler => { + compiler.hooks.thisCompilation.tap("Test", compilation => { + compilation.hooks.processAssets.tap( + { + name: "Test", + stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER + }, + () => { + for (const asset of compilation.getAssets()) { + for (const ext of exts) { + const newFile = `${asset.name}${ext}`; + compilation.emitAsset(newFile, asset.source); + compilation.updateAsset(asset.name, asset.source, { + related: { + compressed: ["...", newFile] + } + }); + } + } + } + ); + }); +}; + +const base = name => ({ + name, + mode: "development", + devtool: "source-map", + entry: "./index", + output: { + filename: `${name}-[name].js` + }, + module: { + rules: [ + { + test: /\.css$/, + use: [MCEP.loader, "css-loader"] + } + ] + }, + plugins: [ + new MCEP({ + filename: `${name}-[name].css` + }), + compression([".br", ".gz"]) + ] +}); + +const baseStats = { + entrypoints: false, + modules: false, + timings: false, + version: false, + hash: false, + builtAt: false +}; + +/** @type {import("../../../").Configuration} */ +module.exports = [ + { + ...base("default"), + stats: { + ...baseStats + } + }, + { + ...base("relatedAssets"), + stats: { + ...baseStats, + relatedAssets: true + } + }, + { + ...base("exclude1"), + stats: { + ...baseStats, + relatedAssets: true, + excludeAssets: /\.(gz|br)$/ + } + }, + { + ...base("exclude2"), + stats: { + ...baseStats, + relatedAssets: true, + excludeAssets: /\.map$/ + } + }, + { + ...base("exclude3"), + stats: { + ...baseStats, + relatedAssets: true, + excludeAssets: /chunk/ + } + } +]; diff --git a/types.d.ts b/types.d.ts index 9ffa16fc740..17c1347dde1 100644 --- a/types.d.ts +++ b/types.d.ts @@ -8120,6 +8120,11 @@ declare interface StatsOptions { */ reasons?: boolean; + /** + * Add information about assets that are related to other assets (like SourceMaps for assets). + */ + relatedAssets?: boolean; + /** * Add information about runtime modules. */