mirror of https://github.com/webpack/webpack.git
add MangleExportsPlugin and options
This commit is contained in:
parent
71b1c6aa8d
commit
6fc0b96c9c
|
|
@ -809,6 +809,10 @@ export interface OptimizationOptions {
|
|||
* Also flag chunks as loaded which contain a subset of the modules
|
||||
*/
|
||||
flagIncludedChunks?: boolean;
|
||||
/**
|
||||
* Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports)
|
||||
*/
|
||||
mangleExports?: boolean;
|
||||
/**
|
||||
* Reduce size of WASM by changing imports to shorter strings.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -345,6 +345,9 @@ class Compilation {
|
|||
/** @type {SyncHook<Iterable<Chunk>, any>} */
|
||||
recordChunks: new SyncHook(["chunks", "records"]),
|
||||
|
||||
/** @type {SyncHook<Iterable<Module>>} */
|
||||
optimizeCodeGeneration: new SyncHook(["modules"]),
|
||||
|
||||
/** @type {SyncHook} */
|
||||
beforeModuleHash: new SyncHook([]),
|
||||
/** @type {SyncHook} */
|
||||
|
|
@ -1288,6 +1291,8 @@ class Compilation {
|
|||
this.hooks.recordChunks.call(this.chunks, this.records);
|
||||
}
|
||||
|
||||
this.hooks.optimizeCodeGeneration.call(this.modules);
|
||||
|
||||
this.hooks.beforeModuleHash.call();
|
||||
this.createModuleHashes();
|
||||
this.hooks.afterModuleHash.call();
|
||||
|
|
|
|||
|
|
@ -40,10 +40,19 @@ class FlagDependencyUsagePlugin {
|
|||
changed = exportsInfo.setUsedInUnknownWay();
|
||||
} else if (usedExports) {
|
||||
for (const exportName of usedExports) {
|
||||
const exportInfo = exportsInfo.getExportInfo(exportName);
|
||||
if (exportInfo.used !== true) {
|
||||
exportInfo.used = true;
|
||||
changed = true;
|
||||
if (
|
||||
exportName === "default" &&
|
||||
module.buildMeta.exportsType === "named"
|
||||
) {
|
||||
if (exportsInfo.setUsedAsNamedExportType()) {
|
||||
changed = true;
|
||||
}
|
||||
} else {
|
||||
const exportInfo = exportsInfo.getExportInfo(exportName);
|
||||
if (exportInfo.used !== true) {
|
||||
exportInfo.used = true;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -84,14 +84,12 @@ class FunctionModuleTemplatePlugin {
|
|||
source.add(" !*** " + reqStr + " ***!\n");
|
||||
source.add(" \\****" + reqStrStar + "****/\n");
|
||||
const exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
for (const exportInfo of exportsInfo.exports) {
|
||||
for (const exportInfo of exportsInfo.orderedExports) {
|
||||
source.add(
|
||||
Template.toComment(
|
||||
`export ${
|
||||
exportInfo.usedName === exportInfo.name
|
||||
? `${exportInfo.name} (renamed to ${exportInfo.usedName})`
|
||||
: exportInfo.name
|
||||
} [${exportInfo.getProvidedInfo()}] [${exportInfo.getUsedInfo()}] [${exportInfo.getCanMangleInfo()}]`
|
||||
exportInfo.name
|
||||
} [${exportInfo.getProvidedInfo()}] [${exportInfo.getUsedInfo()}] [${exportInfo.getRenameInfo()}]`
|
||||
) + "\n"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
const ChunkGraph = require("./ChunkGraph");
|
||||
const DependenciesBlock = require("./DependenciesBlock");
|
||||
const ModuleGraph = require("./ModuleGraph");
|
||||
const Template = require("./Template");
|
||||
const { compareChunksById } = require("./util/comparators");
|
||||
const makeSerializable = require("./util/makeSerializable");
|
||||
|
||||
|
|
@ -56,16 +55,6 @@ const EMPTY_RESOLVE_OPTIONS = {};
|
|||
|
||||
let debugId = 1000;
|
||||
|
||||
const getIndexMap = set => {
|
||||
set.sort();
|
||||
const map = new Map();
|
||||
let idx = 0;
|
||||
for (const item of set) {
|
||||
map.set(item, idx++);
|
||||
}
|
||||
return map;
|
||||
};
|
||||
|
||||
const getJoinedString = set => {
|
||||
set.sort();
|
||||
return Array.from(set).join(",");
|
||||
|
|
@ -417,30 +406,7 @@ class Module extends DependenciesBlock {
|
|||
* string, the mangled export name when used.
|
||||
*/
|
||||
getUsedName(moduleGraph, exportName) {
|
||||
const usedExports = moduleGraph.getUsedExports(this);
|
||||
if (usedExports === null || usedExports === true) return exportName;
|
||||
if (usedExports === false) return false;
|
||||
if (!usedExports.has(exportName)) return false;
|
||||
|
||||
// Mangle export name if possible
|
||||
if (moduleGraph.getExportInfo(this, exportName).canMangle) {
|
||||
if (this.buildMeta.exportsType === "namespace") {
|
||||
const idx = usedExports
|
||||
.getFromUnorderedCache(getIndexMap)
|
||||
.get(exportName);
|
||||
return Template.numberToIdentifer(idx);
|
||||
}
|
||||
if (
|
||||
this.buildMeta.exportsType === "named" &&
|
||||
!usedExports.has("default")
|
||||
) {
|
||||
const idx = usedExports
|
||||
.getFromUnorderedCache(getIndexMap)
|
||||
.get(exportName);
|
||||
return Template.numberToIdentifer(idx);
|
||||
}
|
||||
}
|
||||
return exportName;
|
||||
return moduleGraph.getReadOnlyExportInfo(this, exportName).getUsedName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,13 +27,39 @@ class ExportsInfo {
|
|||
this._exports = new Map();
|
||||
this._otherExportsInfo = new ExportInfo(null);
|
||||
this._sideEffectsOnlyInfo = new ExportInfo("*side effects only*");
|
||||
this._exportsIsOrdered = false;
|
||||
this._exportsAreOrdered = false;
|
||||
}
|
||||
|
||||
setTo(exportsInfo) {
|
||||
this._otherExportsInfo = new ExportInfo(
|
||||
null,
|
||||
exportsInfo._otherExportsInfo
|
||||
);
|
||||
this._sideEffectsOnlyInfo = new ExportInfo(
|
||||
"*side effects only*",
|
||||
exportsInfo._sideEffectsOnlyInfo
|
||||
);
|
||||
this._exportsAreOrdered = exportsInfo._exportsAreOrdered;
|
||||
this._exports.clear();
|
||||
for (const exportInfo of exportsInfo.exports) {
|
||||
this._exports.set(
|
||||
exportInfo.name,
|
||||
new ExportInfo(exportInfo.name, exportInfo)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
get exports() {
|
||||
return this._exports.values();
|
||||
}
|
||||
|
||||
get orderedExports() {
|
||||
if (!this._exportsAreOrdered) {
|
||||
this._sortExports();
|
||||
}
|
||||
return this._exports.values();
|
||||
}
|
||||
|
||||
get otherExportsInfo() {
|
||||
return this._otherExportsInfo;
|
||||
}
|
||||
|
|
@ -44,7 +70,7 @@ class ExportsInfo {
|
|||
newMap.set(name, this._exports.get(name));
|
||||
}
|
||||
this._exports = newMap;
|
||||
this._exportsIsOrdered = true;
|
||||
this._exportsAreOrdered = true;
|
||||
}
|
||||
|
||||
setHasProvideInfo() {
|
||||
|
|
@ -52,15 +78,15 @@ class ExportsInfo {
|
|||
if (exportInfo.provided === undefined) {
|
||||
exportInfo.provided = false;
|
||||
}
|
||||
if (exportInfo.canMangle === undefined) {
|
||||
exportInfo.canMangle = true;
|
||||
if (exportInfo.canMangleProvide === undefined) {
|
||||
exportInfo.canMangleProvide = true;
|
||||
}
|
||||
}
|
||||
if (this._otherExportsInfo.provided === undefined) {
|
||||
this._otherExportsInfo.provided = false;
|
||||
}
|
||||
if (this._otherExportsInfo.canMangle === undefined) {
|
||||
this._otherExportsInfo.canMangle = true;
|
||||
if (this._otherExportsInfo.canMangleProvide === undefined) {
|
||||
this._otherExportsInfo.canMangleProvide = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,10 +95,16 @@ class ExportsInfo {
|
|||
if (exportInfo.used === undefined) {
|
||||
exportInfo.used = false;
|
||||
}
|
||||
if (exportInfo.canMangleUse === undefined) {
|
||||
exportInfo.canMangleUse = true;
|
||||
}
|
||||
}
|
||||
if (this._otherExportsInfo.used === undefined) {
|
||||
this._otherExportsInfo.used = false;
|
||||
}
|
||||
if (this._otherExportsInfo.canMangleUse === undefined) {
|
||||
this._otherExportsInfo.canMangleUse = true;
|
||||
}
|
||||
if (this._sideEffectsOnlyInfo.used === undefined) {
|
||||
this._sideEffectsOnlyInfo.used = false;
|
||||
}
|
||||
|
|
@ -83,7 +115,7 @@ class ExportsInfo {
|
|||
if (info !== undefined) return info;
|
||||
const newInfo = new ExportInfo(name, this._otherExportsInfo);
|
||||
this._exports.set(name, newInfo);
|
||||
this._exportsIsOrdered = false;
|
||||
this._exportsAreOrdered = false;
|
||||
return newInfo;
|
||||
}
|
||||
|
||||
|
|
@ -103,8 +135,8 @@ class ExportsInfo {
|
|||
exportInfo.provided = null;
|
||||
changed = true;
|
||||
}
|
||||
if (exportInfo.canMangle !== false) {
|
||||
exportInfo.canMangle = false;
|
||||
if (exportInfo.canMangleProvide !== false) {
|
||||
exportInfo.canMangleProvide = false;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -115,8 +147,8 @@ class ExportsInfo {
|
|||
this._otherExportsInfo.provided = null;
|
||||
changed = true;
|
||||
}
|
||||
if (this._otherExportsInfo.canMangle !== false) {
|
||||
this._otherExportsInfo.canMangle = false;
|
||||
if (this._otherExportsInfo.canMangleProvide !== false) {
|
||||
this._otherExportsInfo.canMangleProvide = false;
|
||||
changed = true;
|
||||
}
|
||||
return changed;
|
||||
|
|
@ -133,8 +165,8 @@ class ExportsInfo {
|
|||
exportInfo.used = null;
|
||||
changed = true;
|
||||
}
|
||||
if (exportInfo.canMangle !== false) {
|
||||
exportInfo.canMangle = false;
|
||||
if (exportInfo.canMangleUse !== false) {
|
||||
exportInfo.canMangleUse = false;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -145,8 +177,39 @@ class ExportsInfo {
|
|||
this._otherExportsInfo.used = null;
|
||||
changed = true;
|
||||
}
|
||||
if (this._otherExportsInfo.canMangle !== false) {
|
||||
this._otherExportsInfo.canMangle = false;
|
||||
if (this._otherExportsInfo.canMangleUse !== false) {
|
||||
this._otherExportsInfo.canMangleUse = false;
|
||||
changed = true;
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
setUsedAsNamedExportType() {
|
||||
let changed = false;
|
||||
if (this._isUsed === false) {
|
||||
this._isUsed = true;
|
||||
changed = true;
|
||||
}
|
||||
this.getExportInfo("default").used = true;
|
||||
for (const exportInfo of this._exports.values()) {
|
||||
if (exportInfo.used !== true && exportInfo.used !== null) {
|
||||
exportInfo.used = null;
|
||||
changed = true;
|
||||
}
|
||||
if (exportInfo.name !== "default" && exportInfo.canMangleUse !== false) {
|
||||
exportInfo.canMangleUse = false;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if (
|
||||
this._otherExportsInfo.used !== true &&
|
||||
this._otherExportsInfo.used !== null
|
||||
) {
|
||||
this._otherExportsInfo.used = null;
|
||||
changed = true;
|
||||
}
|
||||
if (this._otherExportsInfo.canMangleUse !== false) {
|
||||
this._otherExportsInfo.canMangleUse = false;
|
||||
changed = true;
|
||||
}
|
||||
return changed;
|
||||
|
|
@ -184,7 +247,7 @@ class ExportsInfo {
|
|||
return true;
|
||||
}
|
||||
const array = [];
|
||||
if (!this._exportsIsOrdered) this._sortExports();
|
||||
if (!this._exportsAreOrdered) this._sortExports();
|
||||
for (const exportInfo of this._exports.values()) {
|
||||
switch (exportInfo.used) {
|
||||
case undefined:
|
||||
|
|
@ -216,7 +279,7 @@ class ExportsInfo {
|
|||
return true;
|
||||
}
|
||||
const array = [];
|
||||
if (!this._exportsIsOrdered) this._sortExports();
|
||||
if (!this._exportsAreOrdered) this._sortExports();
|
||||
for (const exportInfo of this._exports.values()) {
|
||||
switch (exportInfo.provided) {
|
||||
case undefined:
|
||||
|
|
@ -238,38 +301,38 @@ class ExportsInfo {
|
|||
|
||||
getRestoreProvidedData() {
|
||||
const otherProvided = this._otherExportsInfo.provided;
|
||||
const otherCanMangle = this._otherExportsInfo.canMangle;
|
||||
const otherCanMangleProvide = this._otherExportsInfo.canMangleProvide;
|
||||
const exports = [];
|
||||
for (const exportInfo of this._exports.values()) {
|
||||
if (
|
||||
exportInfo.provided !== otherProvided ||
|
||||
exportInfo.canMangle !== otherCanMangle
|
||||
exportInfo.canMangleProvide !== otherCanMangleProvide
|
||||
) {
|
||||
exports.push({
|
||||
name: exportInfo.name,
|
||||
provided: exportInfo.provided,
|
||||
canMangle: exportInfo.canMangle
|
||||
canMangleProvide: exportInfo.canMangleProvide
|
||||
});
|
||||
}
|
||||
}
|
||||
return {
|
||||
exports,
|
||||
otherProvided,
|
||||
otherCanMangle
|
||||
otherCanMangleProvide
|
||||
};
|
||||
}
|
||||
|
||||
restoreProvided({ otherProvided, otherCanMangle, exports }) {
|
||||
restoreProvided({ otherProvided, otherCanMangleProvide, exports }) {
|
||||
for (const exportInfo of this._exports.values()) {
|
||||
exportInfo.provided = otherProvided;
|
||||
exportInfo.canMangle = otherCanMangle;
|
||||
exportInfo.canMangleProvide = otherCanMangleProvide;
|
||||
}
|
||||
this._otherExportsInfo.provided = otherProvided;
|
||||
this._otherExportsInfo.canMangle = otherCanMangle;
|
||||
this._otherExportsInfo.canMangleProvide = otherCanMangleProvide;
|
||||
for (const exp of exports) {
|
||||
const exportInfo = this.getExportInfo(exp.name);
|
||||
exportInfo.provided = exp.provided;
|
||||
exportInfo.canMangle = exp.canMangle;
|
||||
exportInfo.canMangleProvide = exp.canMangleProvide;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -282,6 +345,8 @@ class ExportInfo {
|
|||
constructor(name, initFrom) {
|
||||
/** @type {string} */
|
||||
this.name = name;
|
||||
/** @type {string | null} */
|
||||
this.usedName = initFrom ? initFrom.usedName : null;
|
||||
/**
|
||||
* true: it is used
|
||||
* false: it is not used
|
||||
|
|
@ -304,7 +369,42 @@ class ExportInfo {
|
|||
* undefined: it was not determined if it can be mangled
|
||||
* @type {boolean | undefined}
|
||||
*/
|
||||
this.canMangle = initFrom ? initFrom.canMangle : undefined;
|
||||
this.canMangleProvide = initFrom ? initFrom.canMangleProvide : undefined;
|
||||
/**
|
||||
* true: it can be mangled
|
||||
* false: is can not be mangled
|
||||
* undefined: it was not determined if it can be mangled
|
||||
* @type {boolean | undefined}
|
||||
*/
|
||||
this.canMangleUse = initFrom ? initFrom.canMangleUse : undefined;
|
||||
}
|
||||
|
||||
get canMangle() {
|
||||
switch (this.canMangleProvide) {
|
||||
case undefined:
|
||||
return this.canMangleUse === false ? false : undefined;
|
||||
case false:
|
||||
return false;
|
||||
case true:
|
||||
switch (this.canMangleUse) {
|
||||
case undefined:
|
||||
return undefined;
|
||||
case false:
|
||||
return false;
|
||||
case true:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
throw new Error(
|
||||
`Unexpected flags for canMangle ${this.canMangleProvide} ${
|
||||
this.canMangleUse
|
||||
}`
|
||||
);
|
||||
}
|
||||
|
||||
getUsedName() {
|
||||
if (this.used === false) return false;
|
||||
return this.usedName || this.name;
|
||||
}
|
||||
|
||||
getUsedInfo() {
|
||||
|
|
@ -333,15 +433,48 @@ class ExportInfo {
|
|||
}
|
||||
}
|
||||
|
||||
getCanMangleInfo() {
|
||||
switch (this.canMangle) {
|
||||
getRenameInfo() {
|
||||
switch (this.canMangleProvide) {
|
||||
case undefined:
|
||||
return "can not be renamed (no info)";
|
||||
switch (this.canMangleUse) {
|
||||
case undefined:
|
||||
return "missing provision and use info prevents renaming";
|
||||
case false:
|
||||
return "usage prevents renaming (no provision info)";
|
||||
case true:
|
||||
return "missing provision info prevents renaming";
|
||||
}
|
||||
break;
|
||||
case true:
|
||||
return "can be renamed";
|
||||
switch (this.canMangleUse) {
|
||||
case undefined:
|
||||
return "missing usage info prevents renaming";
|
||||
case false:
|
||||
return "usage prevents renaming";
|
||||
case true:
|
||||
if (this.usedName && this.usedName !== this.name) {
|
||||
return `renamed to ${this.usedName}`;
|
||||
} else {
|
||||
return "can be renamed";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case false:
|
||||
return "can not be renamed";
|
||||
switch (this.canMangleUse) {
|
||||
case undefined:
|
||||
return "provision prevents renaming (no use info)";
|
||||
case false:
|
||||
return "usage and provision prevents renaming";
|
||||
case true:
|
||||
return "provision prevents renaming";
|
||||
}
|
||||
break;
|
||||
}
|
||||
throw new Error(
|
||||
`Unexpected flags for getRenameInfo ${this.canMangleProvide} ${
|
||||
this.canMangleUse
|
||||
}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -504,8 +637,7 @@ class ModuleGraph {
|
|||
newMgm.postOrderIndex = oldMgm.postOrderIndex;
|
||||
newMgm.preOrderIndex = oldMgm.preOrderIndex;
|
||||
newMgm.depth = oldMgm.depth;
|
||||
// TODO optimize this
|
||||
newMgm.exports.restoreProvided(oldMgm.exports.getRestoreProvidedData());
|
||||
newMgm.exports = oldMgm.exports;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -723,6 +855,16 @@ class ModuleGraph {
|
|||
return mgm.exports.getExportInfo(exportName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Module} module the module
|
||||
* @param {string} exportName the export
|
||||
* @returns {ExportInfo} info about the export (do not modify)
|
||||
*/
|
||||
getReadOnlyExportInfo(module, exportName) {
|
||||
const mgm = this._getModuleGraphModule(module);
|
||||
return mgm.exports.getReadOnlyExportInfo(exportName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Module} module the module
|
||||
* @returns {false | true | SortableSet<string> | null} the used exports
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ const FlagDependencyUsagePlugin = require("./FlagDependencyUsagePlugin");
|
|||
const NoEmitOnErrorsPlugin = require("./NoEmitOnErrorsPlugin");
|
||||
const EnsureChunkConditionsPlugin = require("./optimize/EnsureChunkConditionsPlugin");
|
||||
const FlagIncludedChunksPlugin = require("./optimize/FlagIncludedChunksPlugin");
|
||||
const MangleExportsPlugin = require("./optimize/MangleExportsPlugin");
|
||||
const MergeDuplicateChunksPlugin = require("./optimize/MergeDuplicateChunksPlugin");
|
||||
const ModuleConcatenationPlugin = require("./optimize/ModuleConcatenationPlugin");
|
||||
const RemoveEmptyChunksPlugin = require("./optimize/RemoveEmptyChunksPlugin");
|
||||
|
|
@ -369,6 +370,9 @@ class WebpackOptionsApply extends OptionsApply {
|
|||
if (options.optimization.usedExports) {
|
||||
new FlagDependencyUsagePlugin().apply(compiler);
|
||||
}
|
||||
if (options.optimization.mangleExports) {
|
||||
new MangleExportsPlugin().apply(compiler);
|
||||
}
|
||||
if (options.optimization.concatenateModules) {
|
||||
new ModuleConcatenationPlugin().apply(compiler);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
|||
this.set("optimization.usedExports", "make", options =>
|
||||
isProductionLikeMode(options)
|
||||
);
|
||||
this.set("optimization.mangleExports", "make", options =>
|
||||
isProductionLikeMode(options)
|
||||
);
|
||||
this.set("optimization.concatenateModules", "make", options =>
|
||||
isProductionLikeMode(options)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,8 @@ const getExternalImport = (
|
|||
asCall,
|
||||
strictHarmonyModule
|
||||
) => {
|
||||
const used = importedModule.getUsedName(moduleGraph, exportName);
|
||||
const used =
|
||||
exportName === true || importedModule.getUsedName(moduleGraph, exportName);
|
||||
if (!used) return "/* unused reexport */undefined";
|
||||
const comment =
|
||||
used !== exportName ? ` ${Template.toNormalComment(exportName)}` : "";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||||
Author Tobias Koppers @sokra
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
const { numberToIdentifer } = require("../Template");
|
||||
const {
|
||||
concatComparators,
|
||||
compareSelect,
|
||||
compareStringsNumeric
|
||||
} = require("../util/comparators");
|
||||
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
|
||||
const canMangleSomething = exportsInfo => {
|
||||
for (const exportInfo of exportsInfo.exports) {
|
||||
if (exportInfo.canMangle === true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const comparator = concatComparators(
|
||||
// Sort used before unused fields
|
||||
compareSelect(e => e.used !== false, (a, b) => (a === b ? 0 : a ? -1 : 1)),
|
||||
// Sort by name
|
||||
compareSelect(e => e.name, compareStringsNumeric)
|
||||
);
|
||||
|
||||
class MangleExportsPlugin {
|
||||
/**
|
||||
* @param {Compiler} compiler webpack compiler
|
||||
* @returns {void}
|
||||
*/
|
||||
apply(compiler) {
|
||||
compiler.hooks.compilation.tap("MangleExportsPlugin", compilation => {
|
||||
const moduleGraph = compilation.moduleGraph;
|
||||
compilation.hooks.optimizeCodeGeneration.tap(
|
||||
"MangleExportsPlugin",
|
||||
modules => {
|
||||
for (const module of modules) {
|
||||
const exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
if (!canMangleSomething(exportsInfo)) continue;
|
||||
const usedNames = new Set();
|
||||
const mangleableExports = [];
|
||||
// Don't rename single char exports or exports that can't be mangled
|
||||
for (const exportInfo of exportsInfo.exports) {
|
||||
const name = exportInfo.name;
|
||||
if (exportInfo.canMangle === true && name.length > 1) {
|
||||
mangleableExports.push(exportInfo);
|
||||
} else {
|
||||
exportInfo.usedName = name;
|
||||
usedNames.add(name);
|
||||
}
|
||||
}
|
||||
mangleableExports.sort(comparator);
|
||||
let i = 0;
|
||||
for (const exportInfo of mangleableExports) {
|
||||
let newName = numberToIdentifer(i++);
|
||||
while (usedNames.has(newName)) {
|
||||
newName = numberToIdentifer(i++);
|
||||
}
|
||||
exportInfo.usedName = newName;
|
||||
// we can skip adding newName to usedNames
|
||||
// as numberToIdentifier never repeats results
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MangleExportsPlugin;
|
||||
|
|
@ -469,6 +469,10 @@
|
|||
"description": "Also flag chunks as loaded which contain a subset of the modules",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mangleExports": {
|
||||
"description": "Rename exports when possible to generate shorter code (depends on optimization.usedExports and optimization.providedExports)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mangleWasmImports": {
|
||||
"description": "Reduce size of WASM by changing imports to shorter strings.",
|
||||
"type": "boolean"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ const DEFAULT_OPTIMIZATIONS = {
|
|||
sideEffects: true,
|
||||
providedExports: true,
|
||||
usedExports: true,
|
||||
mangleExports: true,
|
||||
noEmitOnErrors: false,
|
||||
concatenateModules: false,
|
||||
moduleIds: "size",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`StatsTestCases should print correct stats for aggressive-splitting-entry 1`] = `
|
||||
"Hash: c99c0d5aad7172d3fc17c99c0d5aad7172d3fc17
|
||||
"Hash: 98b735993a3831bdf62998b735993a3831bdf629
|
||||
Child fitting:
|
||||
Hash: c99c0d5aad7172d3fc17
|
||||
Hash: 98b735993a3831bdf629
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -11,8 +11,8 @@ Child fitting:
|
|||
4ec3a56d38eb3a2a2dae.js 1.92 KiB {324} [emitted]
|
||||
69ea1e0c4e453d2cc21c.js 1.07 KiB {780} [emitted]
|
||||
6e8afc9c2e15f398cc94.js 1.92 KiB {972} [emitted]
|
||||
7b4bf185c2f47fcaaac6.js 12.1 KiB {967} [emitted]
|
||||
Entrypoint main = 4ec3a56d38eb3a2a2dae.js 6e8afc9c2e15f398cc94.js 7b4bf185c2f47fcaaac6.js
|
||||
9d13cf19fbc10147353c.js 12.1 KiB {967} [emitted]
|
||||
Entrypoint main = 4ec3a56d38eb3a2a2dae.js 6e8afc9c2e15f398cc94.js 9d13cf19fbc10147353c.js
|
||||
chunk {324} 4ec3a56d38eb3a2a2dae.js 1.76 KiB [initial] [rendered] [recorded] aggressive splitted
|
||||
> ./index main
|
||||
[21] ./b.js 899 bytes {324} [built]
|
||||
|
|
@ -20,7 +20,7 @@ Child fitting:
|
|||
chunk {780} 69ea1e0c4e453d2cc21c.js 916 bytes [rendered]
|
||||
> ./g [967] ./index.js 7:0-13
|
||||
[780] ./g.js 916 bytes {780} [built]
|
||||
chunk {967} 7b4bf185c2f47fcaaac6.js 1.87 KiB (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
chunk {967} 9d13cf19fbc10147353c.js 1.87 KiB (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
> ./index main
|
||||
[153] ./f.js 900 bytes {967} [built]
|
||||
[601] ./e.js 899 bytes {967} [built]
|
||||
|
|
@ -31,7 +31,7 @@ Child fitting:
|
|||
[85] ./d.js 899 bytes {972} [built]
|
||||
[911] ./c.js 899 bytes {972} [built]
|
||||
Child content-change:
|
||||
Hash: c99c0d5aad7172d3fc17
|
||||
Hash: 98b735993a3831bdf629
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -39,8 +39,8 @@ Child content-change:
|
|||
4ec3a56d38eb3a2a2dae.js 1.92 KiB {324} [emitted]
|
||||
69ea1e0c4e453d2cc21c.js 1.07 KiB {780} [emitted]
|
||||
6e8afc9c2e15f398cc94.js 1.92 KiB {972} [emitted]
|
||||
7b4bf185c2f47fcaaac6.js 12.1 KiB {967} [emitted]
|
||||
Entrypoint main = 4ec3a56d38eb3a2a2dae.js 6e8afc9c2e15f398cc94.js 7b4bf185c2f47fcaaac6.js
|
||||
9d13cf19fbc10147353c.js 12.1 KiB {967} [emitted]
|
||||
Entrypoint main = 4ec3a56d38eb3a2a2dae.js 6e8afc9c2e15f398cc94.js 9d13cf19fbc10147353c.js
|
||||
chunk {324} 4ec3a56d38eb3a2a2dae.js 1.76 KiB [initial] [rendered] [recorded] aggressive splitted
|
||||
> ./index main
|
||||
[21] ./b.js 899 bytes {324} [built]
|
||||
|
|
@ -48,7 +48,7 @@ Child content-change:
|
|||
chunk {780} 69ea1e0c4e453d2cc21c.js 916 bytes [rendered]
|
||||
> ./g [967] ./index.js 7:0-13
|
||||
[780] ./g.js 916 bytes {780} [built]
|
||||
chunk {967} 7b4bf185c2f47fcaaac6.js 1.87 KiB (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
chunk {967} 9d13cf19fbc10147353c.js 1.87 KiB (javascript) 5.88 KiB (runtime) [entry] [rendered]
|
||||
> ./index main
|
||||
[153] ./f.js 900 bytes {967} [built]
|
||||
[601] ./e.js 899 bytes {967} [built]
|
||||
|
|
@ -61,7 +61,7 @@ Child content-change:
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for aggressive-splitting-on-demand 1`] = `
|
||||
"Hash: 975260ee5d294c0a2909
|
||||
"Hash: 9490c6f3b59a6253ac1a
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -70,15 +70,15 @@ PublicPath: (none)
|
|||
498336c458ca3e2f210a.js 1020 bytes {601} [emitted]
|
||||
5712ee08c698584c013f.js 1020 bytes {162} [emitted]
|
||||
58c8dc21062619780583.js 1.92 KiB {318} [emitted]
|
||||
6570ba6ef4cff907e30e.js 8.85 KiB {404} [emitted] main
|
||||
6e8afc9c2e15f398cc94.js 1.92 KiB {972} [emitted]
|
||||
7a2801cc285de7fba98d.js 8.85 KiB {404} [emitted] main
|
||||
83eca01c31cb1c0587d9.js 1.92 KiB {625} [emitted]
|
||||
9d0ac517a27e3f3d19d0.js 1020 bytes {355} [emitted]
|
||||
c7cb1626aca4edc50d04.js 1.92 KiB {909} [emitted]
|
||||
e281eb2e68ed1d5784a5.js 1.92 KiB {89}, {355} [emitted]
|
||||
f3e49bab620d29da3576.js 1.92 KiB {601}, {663} [emitted]
|
||||
faec1dd207d2cf59dd83.js 1.91 KiB {535} [emitted]
|
||||
Entrypoint main = 6570ba6ef4cff907e30e.js
|
||||
Entrypoint main = 7a2801cc285de7fba98d.js
|
||||
chunk {89} e281eb2e68ed1d5784a5.js 1.76 KiB [rendered]
|
||||
> ./f ./g ./h ./i ./j ./k [967] ./index.js 4:0-51
|
||||
[355] ./k.js 899 bytes {89} {355} [built]
|
||||
|
|
@ -97,7 +97,7 @@ chunk {401} 481011ba787ca2245f6c.js 1.76 KiB [rendered] [recorded] aggressive sp
|
|||
> ./b ./d ./e ./f ./g ./h ./i ./j ./k [967] ./index.js 6:0-72
|
||||
[397] ./j.js 901 bytes {89} {401} [built]
|
||||
[917] ./i.js 899 bytes {318} {401} [built]
|
||||
chunk {404} 6570ba6ef4cff907e30e.js (main) 248 bytes (javascript) 3.96 KiB (runtime) [entry] [rendered]
|
||||
chunk {404} 7a2801cc285de7fba98d.js (main) 248 bytes (javascript) 3.96 KiB (runtime) [entry] [rendered]
|
||||
> ./index main
|
||||
[967] ./index.js 248 bytes {404} [built]
|
||||
+ 4 hidden chunk modules
|
||||
|
|
@ -430,7 +430,7 @@ Child all:
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for chunk-module-id-range 1`] = `
|
||||
"Hash: aef92999a177b4046170
|
||||
"Hash: 61bb5e85f9333ba31bb2
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -458,7 +458,7 @@ chunk {1} main1.js (main1) 136 bytes (javascript) 279 bytes (runtime) [entry] [r
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for chunks 1`] = `
|
||||
"Hash: 4204dacfe8ab0c98acce
|
||||
"Hash: 063cc5cd8592848eae41
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -498,15 +498,15 @@ chunk {911} 911.bundle.js 54 bytes <{404}> >{130}< [rendered]
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for chunks-development 1`] = `
|
||||
"Hash: dd98e862e1d888d75518
|
||||
"Hash: 574c5fae771e78363cc4
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
Asset Size Chunks Chunk Names
|
||||
b_js.bundle.js 385 bytes {b_js} [emitted]
|
||||
bundle.js 7.97 KiB {main} [emitted] main
|
||||
c_js.bundle.js 594 bytes {c_js} [emitted]
|
||||
d_js-e_js.bundle.js 802 bytes {d_js-e_js} [emitted]
|
||||
b_js.bundle.js 370 bytes {b_js} [emitted]
|
||||
bundle.js 7.94 KiB {main} [emitted] main
|
||||
c_js.bundle.js 579 bytes {c_js} [emitted]
|
||||
d_js-e_js.bundle.js 772 bytes {d_js-e_js} [emitted]
|
||||
Entrypoint main = bundle.js
|
||||
chunk {b_js} b_js.bundle.js 22 bytes <{main}> [rendered]
|
||||
> ./b [./index.js] ./index.js 2:0-16
|
||||
|
|
@ -582,7 +582,7 @@ Entrypoint <CLR=BOLD>main</CLR> = <CLR=32>main.js</CLR>
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for commons-chunk-min-size-0 1`] = `
|
||||
"Hash: b920d41e1e3b43bef164
|
||||
"Hash: e60dbab87c918344e104
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -600,7 +600,7 @@ Entrypoint entry-1 = 314.js entry-1.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for commons-chunk-min-size-Infinity 1`] = `
|
||||
"Hash: f9d65c76c025d3f771ef
|
||||
"Hash: 72c8a6ff4b09531e216c
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -618,36 +618,37 @@ Entrypoint entry-1 = vendor-1.js entry-1.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for commons-plugin-issue-4980 1`] = `
|
||||
"Hash: 6cfb2138c8ceb67deb0a80f6078e3c2dacf4b7d1
|
||||
"Hash: ed51af81631b861e5b8e0277476f1bbdb0c1c9f8
|
||||
Child
|
||||
Hash: 6cfb2138c8ceb67deb0a
|
||||
Hash: ed51af81631b861e5b8e
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
app.58adf9207d7635a774f0.js 6.62 KiB {131} [emitted] app
|
||||
app.8e98a535c4631c44ee06.js 6.62 KiB {131} [emitted] app
|
||||
vendor.db1343b8c15cbfb40349.js 616 bytes {262} [emitted] vendor
|
||||
Entrypoint app = vendor.db1343b8c15cbfb40349.js app.58adf9207d7635a774f0.js
|
||||
Entrypoint app = vendor.db1343b8c15cbfb40349.js app.8e98a535c4631c44ee06.js
|
||||
[946] ./entry-1.js + 2 modules 190 bytes {131} [built]
|
||||
[950] ./constants.js 87 bytes {262} [built]
|
||||
+ 4 hidden modules
|
||||
Child
|
||||
Hash: 80f6078e3c2dacf4b7d1
|
||||
Hash: 0277476f1bbdb0c1c9f8
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
app.fe80305685dc4ae37f97.js 6.63 KiB {131} [emitted] app
|
||||
app.a06b0ba2f6779658cd9d.js 6.63 KiB {131} [emitted] app
|
||||
vendor.db1343b8c15cbfb40349.js 616 bytes {262} [emitted] vendor
|
||||
Entrypoint app = vendor.db1343b8c15cbfb40349.js app.fe80305685dc4ae37f97.js
|
||||
Entrypoint app = vendor.db1343b8c15cbfb40349.js app.a06b0ba2f6779658cd9d.js
|
||||
[914] ./entry-2.js + 2 modules 197 bytes {131} [built]
|
||||
[950] ./constants.js 87 bytes {262} [built]
|
||||
+ 4 hidden modules"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for concat-and-sideeffects 1`] = `
|
||||
"[145] ./index.js + 2 modules 119 bytes {404} [built]
|
||||
"[695] ./node_modules/pmodule/a.js + 1 modules 73 bytes {404} [built]
|
||||
| ./node_modules/pmodule/aa.js 24 bytes [built]
|
||||
| ./node_modules/pmodule/a.js 49 bytes [built]
|
||||
| ./index.js 46 bytes [built]
|
||||
[967] ./index.js 46 bytes {404} [built]
|
||||
ModuleConcatenation bailout: Cannot concat with ./node_modules/pmodule/a.js (<- Module is referenced from different chunks by these modules: ./node_modules/pmodule/index.js)
|
||||
./node_modules/pmodule/index.js 63 bytes [orphan] [built]
|
||||
ModuleConcatenation bailout: Module is not in any chunk
|
||||
./node_modules/pmodule/b.js 49 bytes [orphan] [built]
|
||||
|
|
@ -714,7 +715,7 @@ Unexpected end of JSON input while parsing near ''
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for exclude-with-loader 1`] = `
|
||||
"Hash: edd68ec5ce8683dfc8c0
|
||||
"Hash: 1c7f47bf57cd119a2d9b
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -738,9 +739,9 @@ Entrypoint main = main.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for filter-warnings 1`] = `
|
||||
"Hash: 614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c614c87c680ad23893c7c
|
||||
"Hash: 2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f2f5b15eaf2a1fb80a33f
|
||||
Child undefined:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -770,49 +771,49 @@ Child undefined:
|
|||
WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0]
|
||||
|
||||
Child Terser:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.32 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
Child /Terser/:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.32 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
Child warnings => true:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.32 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
Child [Terser]:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.32 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
Child [/Terser/]:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.32 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
Child [warnings => true]:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.32 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
Child should not filter:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -842,7 +843,7 @@ Child should not filter:
|
|||
WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0]
|
||||
|
||||
Child /should not filter/:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -872,7 +873,7 @@ Child /should not filter/:
|
|||
WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0]
|
||||
|
||||
Child warnings => false:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -902,7 +903,7 @@ Child warnings => false:
|
|||
WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0]
|
||||
|
||||
Child [should not filter]:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -932,7 +933,7 @@ Child [should not filter]:
|
|||
WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0]
|
||||
|
||||
Child [/should not filter/]:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -962,7 +963,7 @@ Child [/should not filter/]:
|
|||
WARNING in Terser Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0]
|
||||
|
||||
Child [warnings => false]:
|
||||
Hash: 614c87c680ad23893c7c
|
||||
Hash: 2f5b15eaf2a1fb80a33f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1087,7 +1088,7 @@ chunk {trees} trees.js (trees) 70 bytes [rendered]
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for import-context-filter 1`] = `
|
||||
"Hash: 144449879158d774f49b
|
||||
"Hash: e44c4398f9d7a53027f4
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1105,7 +1106,7 @@ Entrypoint entry = entry.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for import-weak 1`] = `
|
||||
"Hash: b9735fc7101f20f713f9
|
||||
"Hash: 9d25ae8d5dc05fa14984
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1142,42 +1143,42 @@ Compilation error while processing magic comment(-s): /* webpackPrefetch: nope *
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for issue-7577 1`] = `
|
||||
"Hash: 674de449ed250fedc74a974641d0bee2d29d3eff87858d9e7d8494baaa0d
|
||||
"Hash: 56a389f3f722ccfc241c6cd4f2521d3b26ef6f2fd7caa5f989d1768b1b83
|
||||
Child
|
||||
Hash: 674de449ed250fedc74a
|
||||
Hash: 56a389f3f722ccfc241c
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
a-all-a_js-80d5d793105c1fbb58f1.js 149 bytes {all-a_js} [emitted]
|
||||
a-main-3ba9aa478578189dc722.js 115 bytes {main} [emitted] main
|
||||
a-runtime~main-51515c16a90b8ca4fd63.js 4.66 KiB {runtime~main} [emitted] runtime~main
|
||||
Entrypoint main = a-runtime~main-51515c16a90b8ca4fd63.js a-all-a_js-80d5d793105c1fbb58f1.js a-main-3ba9aa478578189dc722.js
|
||||
a-runtime~main-e3134ada7cff4572b5d6.js 4.66 KiB {runtime~main} [emitted] runtime~main
|
||||
Entrypoint main = a-runtime~main-e3134ada7cff4572b5d6.js a-all-a_js-80d5d793105c1fbb58f1.js a-main-3ba9aa478578189dc722.js
|
||||
[./a.js] 18 bytes {all-a_js} [built]
|
||||
+ 1 hidden module
|
||||
Child
|
||||
Hash: 974641d0bee2d29d3eff
|
||||
Hash: 6cd4f2521d3b26ef6f2f
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
b-all-b_js-f586ead775e42b6ef6f2.js 502 bytes {all-b_js} [emitted]
|
||||
b-main-13605e1c706573337764.js 148 bytes {main} [emitted] main
|
||||
b-runtime~main-e315648c3cfdbfdbbd34.js 6.08 KiB {runtime~main} [emitted] runtime~main
|
||||
b-runtime~main-f57bdc2529333fd92a20.js 6.08 KiB {runtime~main} [emitted] runtime~main
|
||||
b-vendors-node_modules_vendor_js-a7aa3079a16cbae3f591.js 194 bytes {vendors-node_modules_vendor_js} [emitted]
|
||||
Entrypoint main = b-runtime~main-e315648c3cfdbfdbbd34.js b-vendors-node_modules_vendor_js-a7aa3079a16cbae3f591.js b-all-b_js-f586ead775e42b6ef6f2.js b-main-13605e1c706573337764.js
|
||||
Entrypoint main = b-runtime~main-f57bdc2529333fd92a20.js b-vendors-node_modules_vendor_js-a7aa3079a16cbae3f591.js b-all-b_js-f586ead775e42b6ef6f2.js b-main-13605e1c706573337764.js
|
||||
[./b.js] 17 bytes {all-b_js} [built]
|
||||
[./node_modules/vendor.js] 23 bytes {vendors-node_modules_vendor_js} [built]
|
||||
+ 4 hidden modules
|
||||
Child
|
||||
Hash: 87858d9e7d8494baaa0d
|
||||
Hash: d7caa5f989d1768b1b83
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
c-all-b_js-f586ead775e42b6ef6f2.js 502 bytes {all-b_js} [emitted]
|
||||
c-all-c_js-951cb2b9375c7bdea05d.js 369 bytes {all-c_js} [emitted]
|
||||
c-main-3b8ebb4d4d18bb8bef31.js 164 bytes {main} [emitted] main
|
||||
c-runtime~main-d37832fd5dfbab1ced95.js 9.54 KiB {runtime~main} [emitted] runtime~main
|
||||
c-runtime~main-7e3ce90aad438618ff00.js 9.54 KiB {runtime~main} [emitted] runtime~main
|
||||
c-vendors-node_modules_vendor_js-a7aa3079a16cbae3f591.js 194 bytes {vendors-node_modules_vendor_js} [emitted]
|
||||
Entrypoint main = c-runtime~main-d37832fd5dfbab1ced95.js c-all-c_js-951cb2b9375c7bdea05d.js c-main-3b8ebb4d4d18bb8bef31.js (prefetch: c-vendors-node_modules_vendor_js-a7aa3079a16cbae3f591.js c-all-b_js-f586ead775e42b6ef6f2.js)
|
||||
Entrypoint main = c-runtime~main-7e3ce90aad438618ff00.js c-all-c_js-951cb2b9375c7bdea05d.js c-main-3b8ebb4d4d18bb8bef31.js (prefetch: c-vendors-node_modules_vendor_js-a7aa3079a16cbae3f591.js c-all-b_js-f586ead775e42b6ef6f2.js)
|
||||
[./b.js] 17 bytes {all-b_js} [built]
|
||||
[./c.js] 61 bytes {all-c_js} [built]
|
||||
[./node_modules/vendor.js] 23 bytes {vendors-node_modules_vendor_js} [built]
|
||||
|
|
@ -1185,9 +1186,9 @@ Child
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin 1`] = `
|
||||
"Hash: b1b5a334235024991861f7171095df531da2402146ebc6e59d1b60e9b8ba9ee395c9a44fadf020be
|
||||
"Hash: 84d1992ecaf2df38152405c36ea08061c49672c7bff3c899bd78957f7a9c4317fe43ebcc2eaa3ec3
|
||||
Child 1 chunks:
|
||||
Hash: b1b5a334235024991861
|
||||
Hash: 84d1992ecaf2df381524
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1202,7 +1203,7 @@ Child 1 chunks:
|
|||
[967] ./index.js 101 bytes {404} [built]
|
||||
+ 3 hidden chunk modules
|
||||
Child 2 chunks:
|
||||
Hash: f7171095df531da24021
|
||||
Hash: 05c36ea08061c49672c7
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1219,7 +1220,7 @@ Child 2 chunks:
|
|||
[967] ./index.js 101 bytes {404} [built]
|
||||
+ 7 hidden chunk modules
|
||||
Child 3 chunks:
|
||||
Hash: 46ebc6e59d1b60e9b8ba
|
||||
Hash: bff3c899bd78957f7a9c
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1238,7 +1239,7 @@ Child 3 chunks:
|
|||
[967] ./index.js 101 bytes {404} [built]
|
||||
+ 7 hidden chunk modules
|
||||
Child 4 chunks:
|
||||
Hash: 9ee395c9a44fadf020be
|
||||
Hash: 4317fe43ebcc2eaa3ec3
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1316,7 +1317,7 @@ Entrypoint main = main.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for module-assets 1`] = `
|
||||
"Hash: 2a2bff40bcaf79213d7a
|
||||
"Hash: d58658036bbe67257bce
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Entrypoint main = main.js
|
||||
|
|
@ -1453,7 +1454,7 @@ If you don't want to include a polyfill, you can use an empty module like this:
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for module-reasons 1`] = `
|
||||
"Hash: d7522b75c43f47744105
|
||||
"Hash: 111485968d3961c5ca2e
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1577,7 +1578,7 @@ Child
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for named-chunks-plugin 1`] = `
|
||||
"Hash: ac118c65c3de13d240ee
|
||||
"Hash: 4c4b1d5b8b4f87917315
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1592,7 +1593,7 @@ Entrypoint entry = vendor.js entry.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for named-chunks-plugin-async 1`] = `
|
||||
"Hash: 3e5a8e10c5781110eb35
|
||||
"Hash: 0782deccbae8ad224562
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1633,7 +1634,7 @@ Child child:
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for optimize-chunks 1`] = `
|
||||
"Hash: 4f7e6948b648cba64ac3
|
||||
"Hash: dfbdea6e53c8df64ac55
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -1990,7 +1991,7 @@ chunk {855} normal.js (normal) 0 bytes [rendered]"
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for preset-detailed 1`] = `
|
||||
"Hash: 71702b22a6d262080c63
|
||||
"Hash: a608a60134c169755d1b
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -2021,13 +2022,17 @@ chunk {911} 911.js 54 bytes <{404}> >{130}< [rendered]
|
|||
[967] ./index.js 51 bytes {404} [depth 0] [built]
|
||||
ModuleConcatenation bailout: Module is not an ECMAScript module
|
||||
webpack/runtime/ensure chunk 345 bytes {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
webpack/runtime/get javascript chunk filename 183 bytes {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
webpack/runtime/jsonp chunk loading 3.1 KiB {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
webpack/runtime/publicPath 27 bytes {404} [runtime]
|
||||
[no exports used]"
|
||||
[no exports]
|
||||
[used exports unknown]"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for preset-errors-only 1`] = `""`;
|
||||
|
|
@ -2057,7 +2062,7 @@ exports[`StatsTestCases should print correct stats for preset-none-array 1`] = `
|
|||
exports[`StatsTestCases should print correct stats for preset-none-error 1`] = `""`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for preset-normal 1`] = `
|
||||
"Hash: 71702b22a6d262080c63
|
||||
"Hash: a608a60134c169755d1b
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -2140,7 +2145,7 @@ Entrypoints:
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for preset-verbose 1`] = `
|
||||
"Hash: 71702b22a6d262080c63
|
||||
"Hash: a608a60134c169755d1b
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
PublicPath: (none)
|
||||
|
|
@ -2177,13 +2182,17 @@ chunk {404} main.js (main) 73 bytes (javascript) 3.64 KiB (runtime) >{21}< >{911
|
|||
entry ./index main
|
||||
Xms (resolving: Xms, restoring: Xms, integration: Xms, building: Xms, storing: Xms)
|
||||
webpack/runtime/ensure chunk 345 bytes {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
webpack/runtime/get javascript chunk filename 183 bytes {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
webpack/runtime/jsonp chunk loading 3.1 KiB {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
webpack/runtime/publicPath 27 bytes {404} [runtime]
|
||||
[no exports used]
|
||||
[no exports]
|
||||
[used exports unknown]
|
||||
chunk {911} 911.js 54 bytes <{404}> >{130}< [rendered]
|
||||
> ./c [967] ./index.js 3:0-16
|
||||
[911] ./c.js 54 bytes {911} [depth 1] [built]
|
||||
|
|
@ -2279,7 +2288,7 @@ Entrypoint e2 = runtime.js e2.js"
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = `
|
||||
"Hash: 0a87ab378771fc91a701
|
||||
"Hash: bc0f02f2c6ad3bdee4aa
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Entrypoint index = index.js
|
||||
|
|
@ -2308,9 +2317,9 @@ Entrypoint entry = entry.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = `
|
||||
"Hash: 688d8b568919cbd9a11213b4b115124c0312047a
|
||||
"Hash: 8f19a02eed394d9cad04a73d0b99e7b12c3667ad
|
||||
Child
|
||||
Hash: 688d8b568919cbd9a112
|
||||
Hash: 8f19a02eed394d9cad04
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Entrypoint first = vendor.js first.js
|
||||
|
|
@ -2328,7 +2337,7 @@ Child
|
|||
[885] ./common2.js 25 bytes {87} {603} [built]
|
||||
+ 10 hidden modules
|
||||
Child
|
||||
Hash: 13b4b115124c0312047a
|
||||
Hash: a73d0b99e7b12c3667ad
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Entrypoint first = vendor.js first.js
|
||||
|
|
@ -2355,38 +2364,37 @@ Child
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1`] = `
|
||||
"Hash: b4afab758fa19b485ba6
|
||||
"Hash: 8cc3b6a0e43cf6f6e017
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
1.js 489 bytes {1} [emitted]
|
||||
main.js 9.78 KiB {0} [emitted] main
|
||||
1.js 481 bytes {1} [emitted]
|
||||
main.js 9.5 KiB {0} [emitted] main
|
||||
Entrypoint main = main.js
|
||||
[0] ./main.js + 1 modules 231 bytes {0} [built]
|
||||
harmony side effect evaluation ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
harmony export imported specifier ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
[0] ./main.js 144 bytes {0} [built]
|
||||
entry ./main.js main
|
||||
| ./components/src/CompAB/CompB.js 77 bytes [built]
|
||||
| [only some exports used: default]
|
||||
| harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules)
|
||||
| ./main.js 144 bytes [built]
|
||||
[1] ./components/src/CompAB/CompA.js 89 bytes {0} [built]
|
||||
[only some exports used: default]
|
||||
harmony import specifier ./components [0] ./main.js + 1 modules ./main.js 3:15-20 (skipped side-effect-free modules)
|
||||
harmony import specifier ./components [3] ./foo.js 3:20-25 (skipped side-effect-free modules)
|
||||
harmony import specifier ./components [0] ./main.js 3:15-20 (skipped side-effect-free modules)
|
||||
harmony import specifier ./components [4] ./foo.js 3:20-25 (skipped side-effect-free modules)
|
||||
harmony side effect evaluation ./CompA ./components/src/CompAB/index.js 1:0-43
|
||||
harmony export imported specifier ./CompA ./components/src/CompAB/index.js 1:0-43
|
||||
[2] ./components/src/CompAB/utils.js 97 bytes {0} [built]
|
||||
harmony side effect evaluation ./utils [0] ./main.js + 1 modules ./components/src/CompAB/CompB.js 1:0-30
|
||||
harmony import specifier ./utils [0] ./main.js + 1 modules ./components/src/CompAB/CompB.js 5:2-5
|
||||
harmony side effect evaluation ./utils [1] ./components/src/CompAB/CompA.js 1:0-35
|
||||
harmony import specifier ./utils [1] ./components/src/CompAB/CompA.js 5:5-12
|
||||
[3] ./foo.js 101 bytes {1} [built]
|
||||
import() ./foo [0] ./main.js + 1 modules ./main.js 6:0-15
|
||||
harmony side effect evaluation ./utils [3] ./components/src/CompAB/CompB.js 1:0-30
|
||||
harmony import specifier ./utils [3] ./components/src/CompAB/CompB.js 5:2-5
|
||||
[3] ./components/src/CompAB/CompB.js 77 bytes {0} [built]
|
||||
[only some exports used: default]
|
||||
harmony import specifier ./components [0] ./main.js 4:15-20 (skipped side-effect-free modules)
|
||||
harmony side effect evaluation ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
harmony export imported specifier ./CompB ./components/src/CompAB/index.js 2:0-43
|
||||
[4] ./foo.js 101 bytes {1} [built]
|
||||
import() ./foo [0] ./main.js 6:0-15
|
||||
./components/src/index.js 84 bytes [orphan] [built]
|
||||
[module unused]
|
||||
harmony side effect evaluation ./components [0] ./main.js + 1 modules ./main.js 1:0-44
|
||||
harmony side effect evaluation ./components [3] ./foo.js 1:0-37
|
||||
harmony side effect evaluation ./components [0] ./main.js 1:0-44
|
||||
harmony side effect evaluation ./components [4] ./foo.js 1:0-37
|
||||
./components/src/CompAB/index.js 87 bytes [orphan] [built]
|
||||
[module unused]
|
||||
harmony side effect evaluation ./CompAB ./components/src/index.js 1:0-40
|
||||
|
|
@ -2400,39 +2408,39 @@ Entrypoint main = main.js
|
|||
[module unused]
|
||||
harmony side effect evaluation ./CompC ./components/src/CompC/index.js 1:0-34
|
||||
harmony export imported specifier ./CompC ./components/src/CompC/index.js 1:0-34
|
||||
+ 7 hidden modules"
|
||||
+ 6 hidden modules"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for side-effects-simple-unused 1`] = `
|
||||
"Hash: 7f20386a9daa52bf7114
|
||||
"Hash: cba08bd0b20a288185d8
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
main.js 2.75 KiB {404} [emitted] main
|
||||
main.js 3.52 KiB {404} [emitted] main
|
||||
Entrypoint main = main.js
|
||||
[690] ./index.js + 2 modules 158 bytes {404} [built]
|
||||
harmony side effect evaluation ./c ./node_modules/pmodule/b.js 5:0-24
|
||||
harmony export imported specifier ./c ./node_modules/pmodule/b.js 5:0-24
|
||||
[200] ./index.js + 1 modules 135 bytes {404} [built]
|
||||
entry ./index main
|
||||
| ./node_modules/pmodule/index.js 75 bytes [built]
|
||||
| [only some exports used: default]
|
||||
| harmony side effect evaluation pmodule ./index.js 1:0-33
|
||||
| harmony import specifier pmodule ./index.js 3:12-15
|
||||
| ./node_modules/pmodule/c.js 28 bytes [built]
|
||||
| [only some exports used: z]
|
||||
| harmony import specifier pmodule ./index.js 3:17-18 (skipped side-effect-free modules)
|
||||
| ./index.js 55 bytes [built]
|
||||
[938] ./node_modules/pmodule/c.js 28 bytes {404} [built]
|
||||
[only some exports used: z]
|
||||
harmony import specifier pmodule [200] ./index.js + 1 modules ./index.js 3:17-18 (skipped side-effect-free modules)
|
||||
harmony side effect evaluation ./c ./node_modules/pmodule/b.js 5:0-24
|
||||
harmony export imported specifier ./c ./node_modules/pmodule/b.js 5:0-24
|
||||
./node_modules/pmodule/a.js 60 bytes [orphan] [built]
|
||||
[module unused]
|
||||
harmony side effect evaluation ./a [690] ./index.js + 2 modules ./node_modules/pmodule/index.js 1:0-20
|
||||
harmony export imported specifier ./a [690] ./index.js + 2 modules ./node_modules/pmodule/index.js 1:0-20
|
||||
harmony side effect evaluation ./a [200] ./index.js + 1 modules ./node_modules/pmodule/index.js 1:0-20
|
||||
harmony export imported specifier ./a [200] ./index.js + 1 modules ./node_modules/pmodule/index.js 1:0-20
|
||||
./node_modules/pmodule/b.js 69 bytes [orphan] [built]
|
||||
[module unused]
|
||||
harmony side effect evaluation ./b [690] ./index.js + 2 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
harmony export imported specifier ./b [690] ./index.js + 2 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
harmony export imported specifier ./b [690] ./index.js + 2 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
harmony export imported specifier ./b [690] ./index.js + 2 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
+ 2 hidden modules"
|
||||
harmony side effect evaluation ./b [200] ./index.js + 1 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
harmony export imported specifier ./b [200] ./index.js + 1 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
harmony export imported specifier ./b [200] ./index.js + 1 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
harmony export imported specifier ./b [200] ./index.js + 1 modules ./node_modules/pmodule/index.js 2:0-30
|
||||
+ 3 hidden modules"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for simple 1`] = `
|
||||
|
|
@ -2440,7 +2448,7 @@ exports[`StatsTestCases should print correct stats for simple 1`] = `
|
|||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 1.57 KiB {main} [emitted] main
|
||||
bundle.js 1.56 KiB {main} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
[./index.js] 0 bytes {main} [built]"
|
||||
`;
|
||||
|
|
@ -3414,11 +3422,11 @@ chunk {784} default/784.js 110 bytes <{404}> ={329}= ={456}= [rendered] split ch
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for tree-shaking 1`] = `
|
||||
"Hash: a3acb33e66e750f824f9
|
||||
"Hash: d233791da1aa6c47b203
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 7.61 KiB {404} [emitted] main
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 7.6 KiB {404} [emitted] main
|
||||
Entrypoint main = bundle.js
|
||||
[21] ./b.js 13 bytes {404} [built]
|
||||
[exports: b]
|
||||
|
|
@ -3452,7 +3460,7 @@ Entrypoint main = bundle.js
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for warnings-terser 1`] = `
|
||||
"Hash: c96fbf67b17eab033a75
|
||||
"Hash: a1c39c4e43eb7943bde9
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
@ -3475,7 +3483,7 @@ WARNING in Terser Plugin: Dropping unused function someUnRemoteUsedFunction5 [./
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for wasm-explorer-examples-sync 1`] = `
|
||||
"Hash: 47b0ccb957697477ebb0
|
||||
"Hash: d8974465e44e9b3e2134
|
||||
Time: Xms
|
||||
Built at: Thu Jan 01 1970 00:00:00 GMT
|
||||
Asset Size Chunks Chunk Names
|
||||
|
|
|
|||
Loading…
Reference in New Issue