Merge pull request #14890 from webpack/fix-space-limited

fix/refactor spaceLimited
This commit is contained in:
Tobias Koppers 2022-01-17 17:39:42 +01:00 committed by GitHub
commit b26793de1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 274 additions and 132 deletions

View File

@ -1658,35 +1658,71 @@ const collapse = children => {
return newChildren; return newChildren;
}; };
const spaceLimited = (itemsAndGroups, max) => { const spaceLimited = (
itemsAndGroups,
max,
filteredChildrenLineReserved = false
) => {
if (max < 1) {
return {
children: undefined,
filteredChildren: getTotalItems(itemsAndGroups)
};
}
/** @type {any[] | undefined} */ /** @type {any[] | undefined} */
let children = undefined; let children = undefined;
/** @type {number | undefined} */ /** @type {number | undefined} */
let filteredChildren = undefined; let filteredChildren = undefined;
// This are the groups, which take 1+ lines each // This are the groups, which take 1+ lines each
const groups = itemsAndGroups.filter(c => c.children || c.filteredChildren); const groups = [];
// The sizes of the groups are stored in groupSizes // The sizes of the groups are stored in groupSizes
const groupSizes = groups.map(g => getItemSize(g)); const groupSizes = [];
// This are the items, which take 1 line each // This are the items, which take 1 line each
const items = itemsAndGroups.filter(c => !c.children && !c.filteredChildren); const items = [];
// The total of group sizes // The total of group sizes
let groupsSize = groupSizes.reduce((a, b) => a + b, 0); let groupsSize = 0;
for (const itemOrGroup of itemsAndGroups) {
// is item
if (!itemOrGroup.children && !itemOrGroup.filteredChildren) {
items.push(itemOrGroup);
} else {
groups.push(itemOrGroup);
const size = getItemSize(itemOrGroup);
groupSizes.push(size);
groupsSize += size;
}
}
if (groupsSize + items.length <= max) { if (groupsSize + items.length <= max) {
// The total size in the current state fits into the max // The total size in the current state fits into the max
// keep all // keep all
children = groups.concat(items); children = groups.length > 0 ? groups.concat(items) : items;
} else if ( } else if (groups.length === 0) {
groups.length > 0 && // slice items to max
groups.length + Math.min(1, items.length) < max // inner space marks that lines for filteredChildren already reserved
) { const limit = max - (filteredChildrenLineReserved ? 0 : 1);
// If each group would take 1 line the total would be below the maximum filteredChildren = items.length - limit;
// collapse some groups, keep items items.length = limit;
while (groupsSize + items.length + (filteredChildren ? 1 : 0) > max) { children = items;
} else {
// limit is the size when all groups are collapsed
const limit =
groups.length +
(filteredChildrenLineReserved || items.length === 0 ? 0 : 1);
if (limit < max) {
// calculate how much we are over the size limit // calculate how much we are over the size limit
// this allows to approach the limit faster // this allows to approach the limit faster
// it's always > 1 let oversize;
const oversize = // If each group would take 1 line the total would be below the maximum
items.length + groupsSize + (filteredChildren ? 1 : 0) - max; // collapse some groups, keep items
while (
(oversize =
groupsSize +
items.length +
(filteredChildren && !filteredChildrenLineReserved ? 1 : 0) -
max) > 0
) {
// Find the maximum group and process only this one // Find the maximum group and process only this one
const maxGroupSize = Math.max(...groupSizes); const maxGroupSize = Math.max(...groupSizes);
if (maxGroupSize < items.length) { if (maxGroupSize < items.length) {
@ -1700,42 +1736,43 @@ const spaceLimited = (itemsAndGroups, max) => {
// run this algorithm recursively and limit the size of the children to // run this algorithm recursively and limit the size of the children to
// current size - oversize / number of groups // current size - oversize / number of groups
// So it should always end up being smaller // So it should always end up being smaller
const headerSize = !group.children const headerSize = group.filteredChildren ? 2 : 1;
? 0
: group.filteredChildren
? 2
: 1;
const limited = spaceLimited( const limited = spaceLimited(
group.children, group.children,
groupSizes[i] - headerSize - oversize / groups.length maxGroupSize -
// we should use ceil to always feet in max
Math.ceil(oversize / groups.length) -
// we substitute size of group head
headerSize,
headerSize === 2
); );
groups[i] = { groups[i] = {
...group, ...group,
children: limited.children, children: limited.children,
filteredChildren: filteredChildren: limited.filteredChildren
(group.filteredChildren || 0) + limited.filteredChildren ? (group.filteredChildren || 0) + limited.filteredChildren
: group.filteredChildren
}; };
const newSize = getItemSize(groups[i]); const newSize = getItemSize(groups[i]);
groupsSize -= groupSizes[i] - newSize; groupsSize -= maxGroupSize - newSize;
groupSizes[i] = newSize; groupSizes[i] = newSize;
break; break;
} }
} }
} }
children = groups.concat(items); children = groups.concat(items);
} else if ( } else if (limit === max) {
groups.length > 0 &&
groups.length + Math.min(1, items.length) <= max
) {
// If we have only enough space to show one line per group and one line for the filtered items // If we have only enough space to show one line per group and one line for the filtered items
// collapse all groups and items // collapse all groups and items
children = groups.length ? collapse(groups) : undefined; children = collapse(groups);
filteredChildren = items.length; filteredChildren = items.length;
} else { } else {
// If we have no space // If we have no space
// collapse complete group // collapse complete group
filteredChildren = getTotalItems(itemsAndGroups); filteredChildren = getTotalItems(itemsAndGroups);
} }
}
return { return {
children, children,
filteredChildren filteredChildren
@ -1777,6 +1814,9 @@ const reasonGroup = (children, reasons) => {
}; };
}; };
const GROUP_EXTENSION_REGEXP = /(\.[^.]+?)(?:\?|(?: \+ \d+ modules?)?$)/;
const GROUP_PATH_REGEXP = /(.+)[/\\][^/\\]+?(?:\?|(?: \+ \d+ modules?)?$)/;
/** @type {Record<string, (groupConfigs: GroupConfig[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void>} */ /** @type {Record<string, (groupConfigs: GroupConfig[], context: StatsFactoryContext, options: NormalizedStatsOptions) => void>} */
const ASSETS_GROUPERS = { const ASSETS_GROUPERS = {
_: (groupConfigs, context, options) => { _: (groupConfigs, context, options) => {
@ -1825,10 +1865,10 @@ const ASSETS_GROUPERS = {
groupConfigs.push({ groupConfigs.push({
getKeys: asset => { getKeys: asset => {
const extensionMatch = const extensionMatch =
groupAssetsByExtension && /(\.[^.]+)(?:\?.*|$)/.exec(asset.name); groupAssetsByExtension && GROUP_EXTENSION_REGEXP.exec(asset.name);
const extension = extensionMatch ? extensionMatch[1] : ""; const extension = extensionMatch ? extensionMatch[1] : "";
const pathMatch = const pathMatch =
groupAssetsByPath && /(.+)[/\\][^/\\]+(?:\?.*|$)/.exec(asset.name); groupAssetsByPath && GROUP_PATH_REGEXP.exec(asset.name);
const path = pathMatch ? pathMatch[1].split(/[/\\]/) : []; const path = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
const keys = []; const keys = [];
if (groupAssetsByPath) { if (groupAssetsByPath) {
@ -2025,10 +2065,10 @@ const MODULES_GROUPERS = type => ({
const dataUrl = /^data:[^,;]+/.exec(resource); const dataUrl = /^data:[^,;]+/.exec(resource);
if (dataUrl) return [dataUrl[0]]; if (dataUrl) return [dataUrl[0]];
const extensionMatch = const extensionMatch =
groupModulesByExtension && /(\.[^.]+)(?:\?.*|$)/.exec(resource); groupModulesByExtension && GROUP_EXTENSION_REGEXP.exec(resource);
const extension = extensionMatch ? extensionMatch[1] : ""; const extension = extensionMatch ? extensionMatch[1] : "";
const pathMatch = const pathMatch =
groupModulesByPath && /(.+)[/\\][^/\\]+(?:\?.*|$)/.exec(resource); groupModulesByPath && GROUP_PATH_REGEXP.exec(resource);
const path = pathMatch ? pathMatch[1].split(/[/\\]/) : []; const path = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
const keys = []; const keys = [];
if (groupModulesByPath) { if (groupModulesByPath) {

View File

@ -57,6 +57,10 @@ const isValidId = id => {
return typeof id === "number" || id; return typeof id === "number" || id;
}; };
const moreCount = (list, count) => {
return list && list.length > 0 ? `+ ${count}` : `${count}`;
};
/** @type {Record<string, (thing: any, context: StatsPrinterContext, printer: StatsPrinter) => string | void>} */ /** @type {Record<string, (thing: any, context: StatsPrinterContext, printer: StatsPrinter) => string | void>} */
const SIMPLE_PRINTERS = { const SIMPLE_PRINTERS = {
"compilation.summary!": ( "compilation.summary!": (
@ -182,13 +186,24 @@ const SIMPLE_PRINTERS = {
}, },
"compilation.assetsByChunkName": () => "", "compilation.assetsByChunkName": () => "",
"compilation.filteredModules": filteredModules => "compilation.filteredModules": (
filteredModules,
{ compilation: { modules } }
) =>
filteredModules > 0 filteredModules > 0
? `${filteredModules} ${plural(filteredModules, "module", "modules")}` ? `${moreCount(modules, filteredModules)} ${plural(
filteredModules,
"module",
"modules"
)}`
: undefined, : undefined,
"compilation.filteredAssets": (filteredAssets, { compilation: { assets } }) => "compilation.filteredAssets": (filteredAssets, { compilation: { assets } }) =>
filteredAssets > 0 filteredAssets > 0
? `${filteredAssets} ${plural(filteredAssets, "asset", "assets")}` ? `${moreCount(assets, filteredAssets)} ${plural(
filteredAssets,
"asset",
"assets"
)}`
: undefined, : undefined,
"compilation.logging": (logging, context, printer) => "compilation.logging": (logging, context, printer) =>
Array.isArray(logging) Array.isArray(logging)
@ -281,15 +296,19 @@ const SIMPLE_PRINTERS = {
"asset.separator!": () => "\n", "asset.separator!": () => "\n",
"asset.filteredRelated": (filteredRelated, { asset: { related } }) => "asset.filteredRelated": (filteredRelated, { asset: { related } }) =>
filteredRelated > 0 filteredRelated > 0
? `${filteredRelated} related ${plural( ? `${moreCount(related, filteredRelated)} related ${plural(
filteredRelated, filteredRelated,
"asset", "asset",
"assets" "assets"
)}` )}`
: undefined, : undefined,
"asset.filteredChildren": filteredChildren => "asset.filteredChildren": (filteredChildren, { asset: { children } }) =>
filteredChildren > 0 filteredChildren > 0
? `${filteredChildren} ${plural(filteredChildren, "asset", "assets")}` ? `${moreCount(children, filteredChildren)} ${plural(
filteredChildren,
"asset",
"assets"
)}`
: undefined, : undefined,
assetChunk: (id, { formatChunkId }) => formatChunkId(id), assetChunk: (id, { formatChunkId }) => formatChunkId(id),
@ -385,21 +404,29 @@ const SIMPLE_PRINTERS = {
"module.issuerPath": (issuerPath, { module }) => "module.issuerPath": (issuerPath, { module }) =>
module.profile ? undefined : "", module.profile ? undefined : "",
"module.profile": profile => undefined, "module.profile": profile => undefined,
"module.filteredModules": filteredModules => "module.filteredModules": (filteredModules, { module: { modules } }) =>
filteredModules > 0 filteredModules > 0
? `${filteredModules} nested ${plural( ? `${moreCount(modules, filteredModules)} nested ${plural(
filteredModules, filteredModules,
"module", "module",
"modules" "modules"
)}` )}`
: undefined, : undefined,
"module.filteredReasons": filteredReasons => "module.filteredReasons": (filteredReasons, { module: { reasons } }) =>
filteredReasons > 0 filteredReasons > 0
? `${filteredReasons} ${plural(filteredReasons, "reason", "reasons")}` ? `${moreCount(reasons, filteredReasons)} ${plural(
filteredReasons,
"reason",
"reasons"
)}`
: undefined, : undefined,
"module.filteredChildren": filteredChildren => "module.filteredChildren": (filteredChildren, { module: { children } }) =>
filteredChildren > 0 filteredChildren > 0
? `${filteredChildren} ${plural(filteredChildren, "module", "modules")}` ? `${moreCount(children, filteredChildren)} ${plural(
filteredChildren,
"module",
"modules"
)}`
: undefined, : undefined,
"module.separator!": () => "\n", "module.separator!": () => "\n",
@ -417,9 +444,16 @@ const SIMPLE_PRINTERS = {
"moduleReason.active": (active, { formatFlag }) => "moduleReason.active": (active, { formatFlag }) =>
active ? undefined : formatFlag("inactive"), active ? undefined : formatFlag("inactive"),
"moduleReason.resolvedModule": (module, { magenta }) => magenta(module), "moduleReason.resolvedModule": (module, { magenta }) => magenta(module),
"moduleReason.filteredChildren": filteredChildren => "moduleReason.filteredChildren": (
filteredChildren,
{ moduleReason: { children } }
) =>
filteredChildren > 0 filteredChildren > 0
? `${filteredChildren} ${plural(filteredChildren, "reason", "reasons")}` ? `${moreCount(children, filteredChildren)} ${plural(
filteredChildren,
"reason",
"reasons"
)}`
: undefined, : undefined,
"module.profile.total": (value, { formatTime }) => formatTime(value), "module.profile.total": (value, { formatTime }) => formatTime(value),
@ -447,10 +481,21 @@ const SIMPLE_PRINTERS = {
size ? formatSize(size) : undefined, size ? formatSize(size) : undefined,
"chunkGroup.auxiliaryAssetsSize": (size, { formatSize }) => "chunkGroup.auxiliaryAssetsSize": (size, { formatSize }) =>
size ? `(${formatSize(size)})` : undefined, size ? `(${formatSize(size)})` : undefined,
"chunkGroup.filteredAssets": n => "chunkGroup.filteredAssets": (n, { chunkGroup: { assets } }) =>
n > 0 ? `${n} ${plural(n, "asset", "assets")}` : undefined, n > 0
"chunkGroup.filteredAuxiliaryAssets": n => ? `${moreCount(assets, n)} ${plural(n, "asset", "assets")}`
n > 0 ? `${n} auxiliary ${plural(n, "asset", "assets")}` : undefined, : undefined,
"chunkGroup.filteredAuxiliaryAssets": (
n,
{ chunkGroup: { auxiliaryAssets } }
) =>
n > 0
? `${moreCount(auxiliaryAssets, n)} auxiliary ${plural(
n,
"asset",
"assets"
)}`
: undefined,
"chunkGroup.is!": () => "=", "chunkGroup.is!": () => "=",
"chunkGroupAsset.name": (asset, { green }) => green(asset), "chunkGroupAsset.name": (asset, { green }) => green(asset),
"chunkGroupAsset.size": (size, { formatSize, chunkGroup }) => "chunkGroupAsset.size": (size, { formatSize, chunkGroup }) =>
@ -510,9 +555,9 @@ const SIMPLE_PRINTERS = {
"chunk.recorded": (recorded, { formatFlag, green }) => "chunk.recorded": (recorded, { formatFlag, green }) =>
recorded ? green(formatFlag("recorded")) : undefined, recorded ? green(formatFlag("recorded")) : undefined,
"chunk.reason": (reason, { yellow }) => (reason ? yellow(reason) : undefined), "chunk.reason": (reason, { yellow }) => (reason ? yellow(reason) : undefined),
"chunk.filteredModules": filteredModules => "chunk.filteredModules": (filteredModules, { chunk: { modules } }) =>
filteredModules > 0 filteredModules > 0
? `${filteredModules} chunk ${plural( ? `${moreCount(modules, filteredModules)} chunk ${plural(
filteredModules, filteredModules,
"module", "module",
"modules" "modules"

View File

@ -1363,13 +1363,46 @@ webpack x.x.x compiled <CLR=32,BOLD>successfully</CLR> in X ms"
exports[`StatsTestCases should print correct stats for max-modules 1`] = ` exports[`StatsTestCases should print correct stats for max-modules 1`] = `
"asset main.js 5.47 KiB [emitted] (name: main) "asset main.js 5.47 KiB [emitted] (name: main)
31 modules ./index.js 181 bytes [built] [code generated]
./a.js?1 33 bytes [built] [code generated]
./a.js?2 33 bytes [built] [code generated]
./a.js?3 33 bytes [built] [code generated]
./a.js?4 33 bytes [built] [code generated]
./a.js?5 33 bytes [built] [code generated]
./a.js?6 33 bytes [built] [code generated]
./a.js?7 33 bytes [built] [code generated]
./a.js?8 33 bytes [built] [code generated]
./a.js?9 33 bytes [built] [code generated]
./a.js?10 33 bytes [built] [code generated]
./c.js?1 33 bytes [built] [code generated]
./c.js?2 33 bytes [built] [code generated]
./c.js?3 33 bytes [built] [code generated]
./c.js?4 33 bytes [built] [code generated]
./c.js?5 33 bytes [built] [code generated]
./c.js?6 33 bytes [built] [code generated]
./c.js?7 33 bytes [built] [code generated]
./c.js?8 33 bytes [built] [code generated]
+ 12 modules
webpack x.x.x compiled successfully in X ms" webpack x.x.x compiled successfully in X ms"
`; `;
exports[`StatsTestCases should print correct stats for max-modules-default 1`] = ` exports[`StatsTestCases should print correct stats for max-modules-default 1`] = `
"asset main.js 5.47 KiB [emitted] (name: main) "asset main.js 5.47 KiB [emitted] (name: main)
31 modules ./index.js 181 bytes [built] [code generated]
./a.js?1 33 bytes [built] [code generated]
./a.js?2 33 bytes [built] [code generated]
./a.js?3 33 bytes [built] [code generated]
./a.js?4 33 bytes [built] [code generated]
./a.js?5 33 bytes [built] [code generated]
./a.js?6 33 bytes [built] [code generated]
./a.js?7 33 bytes [built] [code generated]
./a.js?8 33 bytes [built] [code generated]
./a.js?9 33 bytes [built] [code generated]
./a.js?10 33 bytes [built] [code generated]
./c.js?1 33 bytes [built] [code generated]
./c.js?2 33 bytes [built] [code generated]
./c.js?3 33 bytes [built] [code generated]
+ 17 modules
webpack x.x.x compiled successfully in X ms" webpack x.x.x compiled successfully in X ms"
`; `;
@ -2661,27 +2694,27 @@ exclude1:
hidden assets 28.9 KiB 2 assets hidden assets 28.9 KiB 2 assets
sourceMap exclude1-main.js.map 12.5 KiB [emitted] [dev] (auxiliary name: main) sourceMap exclude1-main.js.map 12.5 KiB [emitted] [dev] (auxiliary name: main)
hidden assets 25 KiB 2 assets hidden assets 25 KiB 2 assets
1 related asset + 1 related asset
1 related asset + 1 related asset
asset exclude1-chunk_js.js 804 bytes [emitted] asset exclude1-chunk_js.js 804 bytes [emitted]
hidden assets 1.57 KiB 2 assets hidden assets 1.57 KiB 2 assets
sourceMap exclude1-chunk_js.js.map 295 bytes [emitted] [dev] sourceMap exclude1-chunk_js.js.map 295 bytes [emitted] [dev]
hidden assets 590 bytes 2 assets hidden assets 590 bytes 2 assets
1 related asset + 1 related asset
1 related asset + 1 related asset
assets by path *.css 144 bytes assets by path *.css 144 bytes
asset exclude1-chunk_js.css 74 bytes [emitted] asset exclude1-chunk_js.css 74 bytes [emitted]
hidden assets 148 bytes 2 assets hidden assets 148 bytes 2 assets
sourceMap exclude1-chunk_js.css.map 197 bytes [emitted] [dev] sourceMap exclude1-chunk_js.css.map 197 bytes [emitted] [dev]
hidden assets 394 bytes 2 assets hidden assets 394 bytes 2 assets
1 related asset + 1 related asset
1 related asset + 1 related asset
asset exclude1-main.css 70 bytes [emitted] (name: main) asset exclude1-main.css 70 bytes [emitted] (name: main)
hidden assets 140 bytes 2 assets hidden assets 140 bytes 2 assets
sourceMap exclude1-main.css.map 187 bytes [emitted] [dev] (auxiliary name: main) sourceMap exclude1-main.css.map 187 bytes [emitted] [dev] (auxiliary name: main)
hidden assets 374 bytes 2 assets hidden assets 374 bytes 2 assets
1 related asset + 1 related asset
1 related asset + 1 related asset
exclude2: exclude2:
assets by path *.js 15.2 KiB assets by path *.js 15.2 KiB
@ -3089,7 +3122,27 @@ exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1
"runtime modules 6.83 KiB 10 modules "runtime modules 6.83 KiB 10 modules
built modules 615 bytes [built] built modules 615 bytes [built]
code generated modules 530 bytes [code generated] code generated modules 530 bytes [code generated]
modules by path ./*.js 377 bytes 7 modules ./index.js 150 bytes [built] [code generated]
Statement (ExpressionStatement) with side effects in source code at 7:0-25
ModuleConcatenation bailout: Cannot concat with ./cjs.js: Module is not an ECMAScript module
ModuleConcatenation bailout: Cannot concat with ./eval.js: Module uses eval()
ModuleConcatenation bailout: Cannot concat with ./module-id.js: Module uses module.id
ModuleConcatenation bailout: Cannot concat with ./module-loaded.js: Module uses module.loaded
./entry.js 32 bytes [built] [code generated]
./cjs.js 59 bytes [built] [code generated]
CommonJS bailout: module.exports is used directly at 3:0-14
Statement (ExpressionStatement) with side effects in source code at 1:0-26
ModuleConcatenation bailout: Module is not an ECMAScript module
./ref-from-cjs.js 45 bytes [built] [code generated]
./eval.js 35 bytes [built] [code generated]
Statement (ExportDefaultDeclaration) with side effects in source code at 1:0-34
ModuleConcatenation bailout: Module uses eval()
./module-id.js 26 bytes [built] [code generated]
Statement (ExportDefaultDeclaration) with side effects in source code at 1:0-25
ModuleConcatenation bailout: Module uses module.id
./module-loaded.js 30 bytes [built] [code generated]
Statement (ExportDefaultDeclaration) with side effects in source code at 1:0-29
ModuleConcatenation bailout: Module uses module.loaded
./concatenated.js + 2 modules 111 bytes [built] [code generated] ./concatenated.js + 2 modules 111 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with external \\"external\\": Module external \\"external\\" is not in the same chunk(s) (expected in chunk(s) unnamed chunk(s), module is in chunk(s) index) ModuleConcatenation bailout: Cannot concat with external \\"external\\": Module external \\"external\\" is not in the same chunk(s) (expected in chunk(s) unnamed chunk(s), module is in chunk(s) index)
external \\"external\\" 42 bytes [built] [code generated] external \\"external\\" 42 bytes [built] [code generated]
@ -3124,14 +3177,18 @@ Entrypoint second 13.5 KiB = b-vendor.js 419 bytes b-second.js 13.1 KiB
runtime modules 15.1 KiB 20 modules runtime modules 15.1 KiB 20 modules
cacheable modules 975 bytes cacheable modules 975 bytes
code generated modules 857 bytes [code generated] code generated modules 857 bytes [code generated]
modules by path ./*.js + 1 modules 459 bytes 3 modules
modules by path ./*.js 106 bytes
./vendor.js 25 bytes [built] [code generated]
./lazy_shared.js 56 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with ./common_lazy_shared.js: Module ./common_lazy_shared.js is referenced from different chunks by these modules: ./lazy_first.js, ./lazy_second.js
./common_lazy_shared.js 25 bytes [built] [code generated]
./first.js + 2 modules 292 bytes [built] [code generated] ./first.js + 2 modules 292 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with ./vendor.js: Module ./vendor.js is not in the same chunk(s) (expected in chunk(s) first, module is in chunk(s) vendor) ModuleConcatenation bailout: Cannot concat with ./vendor.js: Module ./vendor.js is not in the same chunk(s) (expected in chunk(s) first, module is in chunk(s) vendor)
./second.js + 1 modules 227 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with ./vendor.js: Module ./vendor.js is not in the same chunk(s) (expected in chunk(s) second, module is in chunk(s) vendor)
./vendor.js 25 bytes [built] [code generated]
./lazy_first.js + 1 modules 116 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with ./common_lazy_shared.js: Module ./common_lazy_shared.js is referenced from different chunks by these modules: ./lazy_shared.js
./lazy_shared.js 56 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with ./common_lazy_shared.js: Module ./common_lazy_shared.js is referenced from different chunks by these modules: ./lazy_first.js, ./lazy_second.js
./lazy_second.js + 1 modules 116 bytes [built] [code generated]
ModuleConcatenation bailout: Cannot concat with ./common_lazy_shared.js: Module ./common_lazy_shared.js is referenced from different chunks by these modules: ./lazy_shared.js
./common_lazy_shared.js 25 bytes [built] [code generated]
orphan modules 118 bytes [orphan] orphan modules 118 bytes [orphan]
./common2.js 25 bytes [orphan] [built] ./common2.js 25 bytes [orphan] [built]
./module_first.js 31 bytes [orphan] [built] ./module_first.js 31 bytes [orphan] [built]
@ -3149,16 +3206,7 @@ cacheable modules 823 bytes
modules by path ./components/src/ 501 bytes modules by path ./components/src/ 501 bytes
orphan modules 315 bytes [orphan] orphan modules 315 bytes [orphan]
modules by path ./components/src/CompAB/*.js 164 bytes 2 modules modules by path ./components/src/CompAB/*.js 164 bytes 2 modules
modules by path ./components/src/CompC/*.js 67 bytes modules by path ./components/src/CompC/*.js 67 bytes 2 modules
./components/src/CompC/CompC.js 33 bytes [orphan] [built]
[module unused]
[inactive] harmony side effect evaluation ./CompC ./components/src/CompC/index.js 1:0-34
[inactive] harmony export imported specifier ./CompC ./components/src/CompC/index.js 1:0-34
[inactive] harmony export imported specifier ./CompC ./components/src/index.js 2:0-43 (skipped side-effect-free modules)
./components/src/CompC/index.js 34 bytes [orphan] [built]
[module unused]
[inactive] harmony side effect evaluation ./CompC ./components/src/index.js 2:0-43
[inactive] harmony export imported specifier ./CompC ./components/src/index.js 2:0-43
./components/src/index.js 84 bytes [orphan] [built] ./components/src/index.js 84 bytes [orphan] [built]
[module unused] [module unused]
[inactive] from origin ./main.js + 1 modules [inactive] from origin ./main.js + 1 modules
@ -3187,6 +3235,7 @@ cacheable modules 823 bytes
from origin ./main.js + 1 modules from origin ./main.js + 1 modules
[inactive] harmony side effect evaluation ./utils ./main.js + 1 modules ./components/src/CompAB/CompB.js 1:0-30 [inactive] harmony side effect evaluation ./utils ./main.js + 1 modules ./components/src/CompAB/CompB.js 1:0-30
harmony import specifier ./utils ./main.js + 1 modules ./components/src/CompAB/CompB.js 5:2-5 harmony import specifier ./utils ./main.js + 1 modules ./components/src/CompAB/CompB.js 5:2-5
modules by path ./*.js 322 bytes
./main.js + 1 modules 221 bytes [built] [code generated] ./main.js + 1 modules 221 bytes [built] [code generated]
[no exports used] [no exports used]
entry ./main.js main entry ./main.js main
@ -4110,8 +4159,16 @@ switched:
./index.js 1.19 KiB [built] [code generated] ./index.js 1.19 KiB [built] [code generated]
chunk (runtime: main) switched-main-879072e3.js (main-879072e3) 1.68 KiB ={1}= ={59}= ={318}= ={410}= ={520}= ={663}= ={869}= ={997}= [initial] [rendered] chunk (runtime: main) switched-main-879072e3.js (main-879072e3) 1.68 KiB ={1}= ={59}= ={318}= ={410}= ={520}= ={663}= ={869}= ={997}= [initial] [rendered]
> ./ main > ./ main
modules by path ./subfolder/*.js 1.1 KiB 11 modules modules by path ./subfolder/*.js 1.1 KiB
modules by path ./*.js 594 bytes 9 modules ./subfolder/big.js?1 267 bytes [built] [code generated]
./subfolder/big.js?2 267 bytes [built] [code generated]
./subfolder/small.js?1 66 bytes [built] [code generated]
+ 8 modules
modules by path ./*.js 594 bytes
./small.js?1 66 bytes [built] [code generated]
./small.js?2 66 bytes [built] [code generated]
./small.js?3 66 bytes [built] [code generated]
+ 6 modules
chunk (runtime: main) switched-main-12217e1d.js (main-12217e1d) 1.57 KiB (javascript) 3.01 KiB (runtime) ={1}= ={59}= ={318}= ={410}= ={520}= ={581}= ={869}= ={997}= [entry] [rendered] chunk (runtime: main) switched-main-12217e1d.js (main-12217e1d) 1.57 KiB (javascript) 3.01 KiB (runtime) ={1}= ={59}= ={318}= ={410}= ={520}= ={581}= ={869}= ={997}= [entry] [rendered]
> ./ main > ./ main
runtime modules 3.01 KiB 5 modules runtime modules 3.01 KiB 5 modules
@ -4123,13 +4180,13 @@ switched:
./node_modules/small.js?2 66 bytes [built] [code generated] ./node_modules/small.js?2 66 bytes [built] [code generated]
chunk (runtime: main) switched-main-7aeafcb2.js (main-7aeafcb2) 1.62 KiB ={1}= ={59}= ={318}= ={410}= ={520}= ={581}= ={663}= ={869}= [initial] [rendered] chunk (runtime: main) switched-main-7aeafcb2.js (main-7aeafcb2) 1.62 KiB ={1}= ={59}= ={318}= ={410}= ={520}= ={581}= ={663}= ={869}= [initial] [rendered]
> ./ main > ./ main
modules by path ./inner-module/*.js 594 bytes 9 modules modules by path ./inner-module/*.js 594 bytes
./inner-module/small.js?1 66 bytes [built] [code generated]
+ 8 modules
modules by path ./in-some-directory/*.js 531 bytes modules by path ./in-some-directory/*.js 531 bytes
./in-some-directory/big.js?1 267 bytes [built] [code generated] ./in-some-directory/big.js?1 267 bytes [built] [code generated]
./in-some-directory/small.js?1 66 bytes [built] [code generated] ./in-some-directory/small.js?1 66 bytes [built] [code generated]
./in-some-directory/small.js?2 66 bytes [built] [code generated] + 3 modules
./in-some-directory/small.js?3 66 bytes [built] [code generated]
./in-some-directory/small.js?4 66 bytes [built] [code generated]
modules by path ./*.js 534 bytes modules by path ./*.js 534 bytes
./big.js?1 267 bytes [built] [code generated] ./big.js?1 267 bytes [built] [code generated]
./big.js?2 267 bytes [built] [code generated] ./big.js?2 267 bytes [built] [code generated]