Merge pull request #14890 from webpack/fix-space-limited
fix/refactor spaceLimited
This commit is contained in:
commit
b26793de1c
|
@ -1658,84 +1658,121 @@ const collapse = children => {
|
|||
return newChildren;
|
||||
};
|
||||
|
||||
const spaceLimited = (itemsAndGroups, max) => {
|
||||
const spaceLimited = (
|
||||
itemsAndGroups,
|
||||
max,
|
||||
filteredChildrenLineReserved = false
|
||||
) => {
|
||||
if (max < 1) {
|
||||
return {
|
||||
children: undefined,
|
||||
filteredChildren: getTotalItems(itemsAndGroups)
|
||||
};
|
||||
}
|
||||
/** @type {any[] | undefined} */
|
||||
let children = undefined;
|
||||
/** @type {number | undefined} */
|
||||
let filteredChildren = undefined;
|
||||
// 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
|
||||
const groupSizes = groups.map(g => getItemSize(g));
|
||||
const groupSizes = [];
|
||||
// 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
|
||||
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) {
|
||||
// The total size in the current state fits into the max
|
||||
// keep all
|
||||
children = groups.concat(items);
|
||||
} else if (
|
||||
groups.length > 0 &&
|
||||
groups.length + Math.min(1, items.length) < max
|
||||
) {
|
||||
// If each group would take 1 line the total would be below the maximum
|
||||
// collapse some groups, keep items
|
||||
while (groupsSize + items.length + (filteredChildren ? 1 : 0) > max) {
|
||||
children = groups.length > 0 ? groups.concat(items) : items;
|
||||
} else if (groups.length === 0) {
|
||||
// slice items to max
|
||||
// inner space marks that lines for filteredChildren already reserved
|
||||
const limit = max - (filteredChildrenLineReserved ? 0 : 1);
|
||||
filteredChildren = items.length - limit;
|
||||
items.length = limit;
|
||||
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
|
||||
// this allows to approach the limit faster
|
||||
// it's always > 1
|
||||
const oversize =
|
||||
items.length + groupsSize + (filteredChildren ? 1 : 0) - max;
|
||||
// Find the maximum group and process only this one
|
||||
const maxGroupSize = Math.max(...groupSizes);
|
||||
if (maxGroupSize < items.length) {
|
||||
filteredChildren = items.length;
|
||||
items.length = 0;
|
||||
continue;
|
||||
}
|
||||
for (let i = 0; i < groups.length; i++) {
|
||||
if (groupSizes[i] === maxGroupSize) {
|
||||
const group = groups[i];
|
||||
// run this algorithm recursively and limit the size of the children to
|
||||
// current size - oversize / number of groups
|
||||
// So it should always end up being smaller
|
||||
const headerSize = !group.children
|
||||
? 0
|
||||
: group.filteredChildren
|
||||
? 2
|
||||
: 1;
|
||||
const limited = spaceLimited(
|
||||
group.children,
|
||||
groupSizes[i] - headerSize - oversize / groups.length
|
||||
);
|
||||
groups[i] = {
|
||||
...group,
|
||||
children: limited.children,
|
||||
filteredChildren:
|
||||
(group.filteredChildren || 0) + limited.filteredChildren
|
||||
};
|
||||
const newSize = getItemSize(groups[i]);
|
||||
groupsSize -= groupSizes[i] - newSize;
|
||||
groupSizes[i] = newSize;
|
||||
break;
|
||||
let oversize;
|
||||
// If each group would take 1 line the total would be below the maximum
|
||||
// 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
|
||||
const maxGroupSize = Math.max(...groupSizes);
|
||||
if (maxGroupSize < items.length) {
|
||||
filteredChildren = items.length;
|
||||
items.length = 0;
|
||||
continue;
|
||||
}
|
||||
for (let i = 0; i < groups.length; i++) {
|
||||
if (groupSizes[i] === maxGroupSize) {
|
||||
const group = groups[i];
|
||||
// run this algorithm recursively and limit the size of the children to
|
||||
// current size - oversize / number of groups
|
||||
// So it should always end up being smaller
|
||||
const headerSize = group.filteredChildren ? 2 : 1;
|
||||
const limited = spaceLimited(
|
||||
group.children,
|
||||
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] = {
|
||||
...group,
|
||||
children: limited.children,
|
||||
filteredChildren: limited.filteredChildren
|
||||
? (group.filteredChildren || 0) + limited.filteredChildren
|
||||
: group.filteredChildren
|
||||
};
|
||||
const newSize = getItemSize(groups[i]);
|
||||
groupsSize -= maxGroupSize - newSize;
|
||||
groupSizes[i] = newSize;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
children = groups.concat(items);
|
||||
} else if (limit === max) {
|
||||
// If we have only enough space to show one line per group and one line for the filtered items
|
||||
// collapse all groups and items
|
||||
children = collapse(groups);
|
||||
filteredChildren = items.length;
|
||||
} else {
|
||||
// If we have no space
|
||||
// collapse complete group
|
||||
filteredChildren = getTotalItems(itemsAndGroups);
|
||||
}
|
||||
children = groups.concat(items);
|
||||
} else if (
|
||||
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
|
||||
// collapse all groups and items
|
||||
children = groups.length ? collapse(groups) : undefined;
|
||||
filteredChildren = items.length;
|
||||
} else {
|
||||
// If we have no space
|
||||
// collapse complete group
|
||||
filteredChildren = getTotalItems(itemsAndGroups);
|
||||
}
|
||||
|
||||
return {
|
||||
children,
|
||||
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>} */
|
||||
const ASSETS_GROUPERS = {
|
||||
_: (groupConfigs, context, options) => {
|
||||
|
@ -1825,10 +1865,10 @@ const ASSETS_GROUPERS = {
|
|||
groupConfigs.push({
|
||||
getKeys: asset => {
|
||||
const extensionMatch =
|
||||
groupAssetsByExtension && /(\.[^.]+)(?:\?.*|$)/.exec(asset.name);
|
||||
groupAssetsByExtension && GROUP_EXTENSION_REGEXP.exec(asset.name);
|
||||
const extension = extensionMatch ? extensionMatch[1] : "";
|
||||
const pathMatch =
|
||||
groupAssetsByPath && /(.+)[/\\][^/\\]+(?:\?.*|$)/.exec(asset.name);
|
||||
groupAssetsByPath && GROUP_PATH_REGEXP.exec(asset.name);
|
||||
const path = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
|
||||
const keys = [];
|
||||
if (groupAssetsByPath) {
|
||||
|
@ -2025,10 +2065,10 @@ const MODULES_GROUPERS = type => ({
|
|||
const dataUrl = /^data:[^,;]+/.exec(resource);
|
||||
if (dataUrl) return [dataUrl[0]];
|
||||
const extensionMatch =
|
||||
groupModulesByExtension && /(\.[^.]+)(?:\?.*|$)/.exec(resource);
|
||||
groupModulesByExtension && GROUP_EXTENSION_REGEXP.exec(resource);
|
||||
const extension = extensionMatch ? extensionMatch[1] : "";
|
||||
const pathMatch =
|
||||
groupModulesByPath && /(.+)[/\\][^/\\]+(?:\?.*|$)/.exec(resource);
|
||||
groupModulesByPath && GROUP_PATH_REGEXP.exec(resource);
|
||||
const path = pathMatch ? pathMatch[1].split(/[/\\]/) : [];
|
||||
const keys = [];
|
||||
if (groupModulesByPath) {
|
||||
|
|
|
@ -57,6 +57,10 @@ const isValidId = 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>} */
|
||||
const SIMPLE_PRINTERS = {
|
||||
"compilation.summary!": (
|
||||
|
@ -182,13 +186,24 @@ const SIMPLE_PRINTERS = {
|
|||
},
|
||||
"compilation.assetsByChunkName": () => "",
|
||||
|
||||
"compilation.filteredModules": filteredModules =>
|
||||
"compilation.filteredModules": (
|
||||
filteredModules,
|
||||
{ compilation: { modules } }
|
||||
) =>
|
||||
filteredModules > 0
|
||||
? `${filteredModules} ${plural(filteredModules, "module", "modules")}`
|
||||
? `${moreCount(modules, filteredModules)} ${plural(
|
||||
filteredModules,
|
||||
"module",
|
||||
"modules"
|
||||
)}`
|
||||
: undefined,
|
||||
"compilation.filteredAssets": (filteredAssets, { compilation: { assets } }) =>
|
||||
filteredAssets > 0
|
||||
? `${filteredAssets} ${plural(filteredAssets, "asset", "assets")}`
|
||||
? `${moreCount(assets, filteredAssets)} ${plural(
|
||||
filteredAssets,
|
||||
"asset",
|
||||
"assets"
|
||||
)}`
|
||||
: undefined,
|
||||
"compilation.logging": (logging, context, printer) =>
|
||||
Array.isArray(logging)
|
||||
|
@ -281,15 +296,19 @@ const SIMPLE_PRINTERS = {
|
|||
"asset.separator!": () => "\n",
|
||||
"asset.filteredRelated": (filteredRelated, { asset: { related } }) =>
|
||||
filteredRelated > 0
|
||||
? `${filteredRelated} related ${plural(
|
||||
? `${moreCount(related, filteredRelated)} related ${plural(
|
||||
filteredRelated,
|
||||
"asset",
|
||||
"assets"
|
||||
)}`
|
||||
: undefined,
|
||||
"asset.filteredChildren": filteredChildren =>
|
||||
"asset.filteredChildren": (filteredChildren, { asset: { children } }) =>
|
||||
filteredChildren > 0
|
||||
? `${filteredChildren} ${plural(filteredChildren, "asset", "assets")}`
|
||||
? `${moreCount(children, filteredChildren)} ${plural(
|
||||
filteredChildren,
|
||||
"asset",
|
||||
"assets"
|
||||
)}`
|
||||
: undefined,
|
||||
|
||||
assetChunk: (id, { formatChunkId }) => formatChunkId(id),
|
||||
|
@ -385,21 +404,29 @@ const SIMPLE_PRINTERS = {
|
|||
"module.issuerPath": (issuerPath, { module }) =>
|
||||
module.profile ? undefined : "",
|
||||
"module.profile": profile => undefined,
|
||||
"module.filteredModules": filteredModules =>
|
||||
"module.filteredModules": (filteredModules, { module: { modules } }) =>
|
||||
filteredModules > 0
|
||||
? `${filteredModules} nested ${plural(
|
||||
? `${moreCount(modules, filteredModules)} nested ${plural(
|
||||
filteredModules,
|
||||
"module",
|
||||
"modules"
|
||||
)}`
|
||||
: undefined,
|
||||
"module.filteredReasons": filteredReasons =>
|
||||
"module.filteredReasons": (filteredReasons, { module: { reasons } }) =>
|
||||
filteredReasons > 0
|
||||
? `${filteredReasons} ${plural(filteredReasons, "reason", "reasons")}`
|
||||
? `${moreCount(reasons, filteredReasons)} ${plural(
|
||||
filteredReasons,
|
||||
"reason",
|
||||
"reasons"
|
||||
)}`
|
||||
: undefined,
|
||||
"module.filteredChildren": filteredChildren =>
|
||||
"module.filteredChildren": (filteredChildren, { module: { children } }) =>
|
||||
filteredChildren > 0
|
||||
? `${filteredChildren} ${plural(filteredChildren, "module", "modules")}`
|
||||
? `${moreCount(children, filteredChildren)} ${plural(
|
||||
filteredChildren,
|
||||
"module",
|
||||
"modules"
|
||||
)}`
|
||||
: undefined,
|
||||
"module.separator!": () => "\n",
|
||||
|
||||
|
@ -417,9 +444,16 @@ const SIMPLE_PRINTERS = {
|
|||
"moduleReason.active": (active, { formatFlag }) =>
|
||||
active ? undefined : formatFlag("inactive"),
|
||||
"moduleReason.resolvedModule": (module, { magenta }) => magenta(module),
|
||||
"moduleReason.filteredChildren": filteredChildren =>
|
||||
"moduleReason.filteredChildren": (
|
||||
filteredChildren,
|
||||
{ moduleReason: { children } }
|
||||
) =>
|
||||
filteredChildren > 0
|
||||
? `${filteredChildren} ${plural(filteredChildren, "reason", "reasons")}`
|
||||
? `${moreCount(children, filteredChildren)} ${plural(
|
||||
filteredChildren,
|
||||
"reason",
|
||||
"reasons"
|
||||
)}`
|
||||
: undefined,
|
||||
|
||||
"module.profile.total": (value, { formatTime }) => formatTime(value),
|
||||
|
@ -447,10 +481,21 @@ const SIMPLE_PRINTERS = {
|
|||
size ? formatSize(size) : undefined,
|
||||
"chunkGroup.auxiliaryAssetsSize": (size, { formatSize }) =>
|
||||
size ? `(${formatSize(size)})` : undefined,
|
||||
"chunkGroup.filteredAssets": n =>
|
||||
n > 0 ? `${n} ${plural(n, "asset", "assets")}` : undefined,
|
||||
"chunkGroup.filteredAuxiliaryAssets": n =>
|
||||
n > 0 ? `${n} auxiliary ${plural(n, "asset", "assets")}` : undefined,
|
||||
"chunkGroup.filteredAssets": (n, { chunkGroup: { assets } }) =>
|
||||
n > 0
|
||||
? `${moreCount(assets, n)} ${plural(n, "asset", "assets")}`
|
||||
: undefined,
|
||||
"chunkGroup.filteredAuxiliaryAssets": (
|
||||
n,
|
||||
{ chunkGroup: { auxiliaryAssets } }
|
||||
) =>
|
||||
n > 0
|
||||
? `${moreCount(auxiliaryAssets, n)} auxiliary ${plural(
|
||||
n,
|
||||
"asset",
|
||||
"assets"
|
||||
)}`
|
||||
: undefined,
|
||||
"chunkGroup.is!": () => "=",
|
||||
"chunkGroupAsset.name": (asset, { green }) => green(asset),
|
||||
"chunkGroupAsset.size": (size, { formatSize, chunkGroup }) =>
|
||||
|
@ -510,9 +555,9 @@ const SIMPLE_PRINTERS = {
|
|||
"chunk.recorded": (recorded, { formatFlag, green }) =>
|
||||
recorded ? green(formatFlag("recorded")) : undefined,
|
||||
"chunk.reason": (reason, { yellow }) => (reason ? yellow(reason) : undefined),
|
||||
"chunk.filteredModules": filteredModules =>
|
||||
"chunk.filteredModules": (filteredModules, { chunk: { modules } }) =>
|
||||
filteredModules > 0
|
||||
? `${filteredModules} chunk ${plural(
|
||||
? `${moreCount(modules, filteredModules)} chunk ${plural(
|
||||
filteredModules,
|
||||
"module",
|
||||
"modules"
|
||||
|
|
|
@ -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`] = `
|
||||
"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"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for max-modules-default 1`] = `
|
||||
"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"
|
||||
`;
|
||||
|
||||
|
@ -2661,27 +2694,27 @@ exclude1:
|
|||
hidden assets 28.9 KiB 2 assets
|
||||
sourceMap exclude1-main.js.map 12.5 KiB [emitted] [dev] (auxiliary name: main)
|
||||
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]
|
||||
hidden assets 1.57 KiB 2 assets
|
||||
sourceMap exclude1-chunk_js.js.map 295 bytes [emitted] [dev]
|
||||
hidden assets 590 bytes 2 assets
|
||||
1 related asset
|
||||
1 related asset
|
||||
+ 1 related asset
|
||||
+ 1 related asset
|
||||
assets by path *.css 144 bytes
|
||||
asset exclude1-chunk_js.css 74 bytes [emitted]
|
||||
hidden assets 148 bytes 2 assets
|
||||
sourceMap exclude1-chunk_js.css.map 197 bytes [emitted] [dev]
|
||||
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)
|
||||
hidden assets 140 bytes 2 assets
|
||||
sourceMap exclude1-main.css.map 187 bytes [emitted] [dev] (auxiliary name: main)
|
||||
hidden assets 374 bytes 2 assets
|
||||
1 related asset
|
||||
1 related asset
|
||||
+ 1 related asset
|
||||
+ 1 related asset
|
||||
|
||||
exclude2:
|
||||
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
|
||||
built modules 615 bytes [built]
|
||||
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]
|
||||
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]
|
||||
|
@ -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
|
||||
cacheable modules 975 bytes
|
||||
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]
|
||||
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]
|
||||
./common2.js 25 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
|
||||
orphan modules 315 bytes [orphan]
|
||||
modules by path ./components/src/CompAB/*.js 164 bytes 2 modules
|
||||
modules by path ./components/src/CompC/*.js 67 bytes
|
||||
./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
|
||||
modules by path ./components/src/CompC/*.js 67 bytes 2 modules
|
||||
./components/src/index.js 84 bytes [orphan] [built]
|
||||
[module unused]
|
||||
[inactive] from origin ./main.js + 1 modules
|
||||
|
@ -3187,20 +3235,21 @@ cacheable modules 823 bytes
|
|||
from origin ./main.js + 1 modules
|
||||
[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
|
||||
./main.js + 1 modules 221 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./main.js main
|
||||
| ./main.js 144 bytes [built]
|
||||
| [no exports used]
|
||||
| ./components/src/CompAB/CompB.js 77 bytes [built]
|
||||
| [only some exports used: default]
|
||||
| [inactive] from origin ./components/src/CompAB/index.js
|
||||
| [inactive] harmony side effect evaluation ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
| [inactive] harmony export imported specifier ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
| [inactive] harmony export imported specifier ./CompAB ./components/src/index.js 1:0-40 (skipped side-effect-free modules)
|
||||
| harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules)
|
||||
./foo.js 101 bytes [built] [code generated]
|
||||
import() ./foo ./main.js + 1 modules ./main.js 6:0-15
|
||||
modules by path ./*.js 322 bytes
|
||||
./main.js + 1 modules 221 bytes [built] [code generated]
|
||||
[no exports used]
|
||||
entry ./main.js main
|
||||
| ./main.js 144 bytes [built]
|
||||
| [no exports used]
|
||||
| ./components/src/CompAB/CompB.js 77 bytes [built]
|
||||
| [only some exports used: default]
|
||||
| [inactive] from origin ./components/src/CompAB/index.js
|
||||
| [inactive] harmony side effect evaluation ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
| [inactive] harmony export imported specifier ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
| [inactive] harmony export imported specifier ./CompAB ./components/src/index.js 1:0-40 (skipped side-effect-free modules)
|
||||
| harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules)
|
||||
./foo.js 101 bytes [built] [code generated]
|
||||
import() ./foo ./main.js + 1 modules ./main.js 6:0-15
|
||||
webpack x.x.x compiled successfully in X ms"
|
||||
`;
|
||||
|
||||
|
@ -4110,8 +4159,16 @@ switched:
|
|||
./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]
|
||||
> ./ main
|
||||
modules by path ./subfolder/*.js 1.1 KiB 11 modules
|
||||
modules by path ./*.js 594 bytes 9 modules
|
||||
modules by path ./subfolder/*.js 1.1 KiB
|
||||
./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]
|
||||
> ./ main
|
||||
runtime modules 3.01 KiB 5 modules
|
||||
|
@ -4123,13 +4180,13 @@ switched:
|
|||
./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]
|
||||
> ./ 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
|
||||
./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?2 66 bytes [built] [code generated]
|
||||
./in-some-directory/small.js?3 66 bytes [built] [code generated]
|
||||
./in-some-directory/small.js?4 66 bytes [built] [code generated]
|
||||
+ 3 modules
|
||||
modules by path ./*.js 534 bytes
|
||||
./big.js?1 267 bytes [built] [code generated]
|
||||
./big.js?2 267 bytes [built] [code generated]
|
||||
|
|
Loading…
Reference in New Issue