mirror of https://github.com/webpack/webpack.git
refactor
refactor ConcatenatedModule to avoid compilation argument avoid caching inner modules in ConcatenatedModule improve performance of ModuleConcatenationPlugin add ModuleStoreError when storing of module fails
This commit is contained in:
parent
922500ed0d
commit
73fd64fc90
|
@ -550,126 +550,76 @@ class ConcatenatedModule extends Module {
|
||||||
/**
|
/**
|
||||||
* @param {Module} rootModule the root module of the concatenation
|
* @param {Module} rootModule the root module of the concatenation
|
||||||
* @param {Set<Module>} modules all modules in the concantenation (including the root module)
|
* @param {Set<Module>} modules all modules in the concantenation (including the root module)
|
||||||
|
* @param {ModuleGraph} moduleGraph the module graph
|
||||||
|
* @param {Object=} associatedObjectForCache object for caching
|
||||||
|
* @returns {ConcatenatedModule} the module
|
||||||
*/
|
*/
|
||||||
constructor(rootModule, modules) {
|
static createFromModuleGraph(
|
||||||
|
rootModule,
|
||||||
|
modules,
|
||||||
|
moduleGraph,
|
||||||
|
associatedObjectForCache
|
||||||
|
) {
|
||||||
|
const orderedConcatenationList = ConcatenatedModule._createConcatenationList(
|
||||||
|
rootModule,
|
||||||
|
modules,
|
||||||
|
moduleGraph
|
||||||
|
);
|
||||||
|
const identifier = ConcatenatedModule._createIdentifier(
|
||||||
|
rootModule,
|
||||||
|
orderedConcatenationList,
|
||||||
|
associatedObjectForCache
|
||||||
|
);
|
||||||
|
return new ConcatenatedModule({
|
||||||
|
identifier,
|
||||||
|
rootModule,
|
||||||
|
orderedConcatenationList,
|
||||||
|
modules
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} options options
|
||||||
|
* @param {string} options.identifier the identifier of the module
|
||||||
|
* @param {Module=} options.rootModule the root module of the concatenation
|
||||||
|
* @param {Set<Module>=} options.modules all concatenated modules
|
||||||
|
* @param {TODO=} options.orderedConcatenationList the list of concentated modules and externals
|
||||||
|
*/
|
||||||
|
constructor({ identifier, rootModule, modules, orderedConcatenationList }) {
|
||||||
super("javascript/esm", null);
|
super("javascript/esm", null);
|
||||||
|
|
||||||
// Info from Factory
|
// Info from Factory
|
||||||
|
/** @type {string} */
|
||||||
|
this._identifier = identifier;
|
||||||
|
/** @type {Module} */
|
||||||
this.rootModule = rootModule;
|
this.rootModule = rootModule;
|
||||||
this.factoryMeta = rootModule.factoryMeta;
|
/** @type {Set<Module>} */
|
||||||
/** @private @type {Set<Module>} */
|
|
||||||
this._modules = modules;
|
this._modules = modules;
|
||||||
|
this._orderedConcatenationList = orderedConcatenationList;
|
||||||
const modulesArray = Array.from(modules);
|
this.factoryMeta = rootModule && rootModule.factoryMeta;
|
||||||
|
|
||||||
// Info from Build
|
|
||||||
this.buildInfo = {
|
|
||||||
strict: true,
|
|
||||||
cacheable: modulesArray.every(m => m.buildInfo.cacheable),
|
|
||||||
moduleArgument: rootModule.buildInfo.moduleArgument,
|
|
||||||
exportsArgument: rootModule.buildInfo.exportsArgument,
|
|
||||||
fileDependencies: new LazySet(),
|
|
||||||
contextDependencies: new LazySet(),
|
|
||||||
missingDependencies: new LazySet(),
|
|
||||||
assets: undefined
|
|
||||||
};
|
|
||||||
this.buildMeta = rootModule.buildMeta;
|
|
||||||
|
|
||||||
// Caching
|
// Caching
|
||||||
this._numberOfConcatenatedModules = modules.size;
|
|
||||||
/** @private @type {string} */
|
/** @private @type {string} */
|
||||||
this._cachedCodeGenerationHash = "";
|
this._cachedCodeGenerationHash = "";
|
||||||
/** @private @type {CodeGenerationResult} */
|
/** @private @type {CodeGenerationResult} */
|
||||||
this._cachedCodeGeneration = undefined;
|
this._cachedCodeGeneration = undefined;
|
||||||
|
|
||||||
// Graph
|
|
||||||
this.dependencies = [];
|
|
||||||
|
|
||||||
this._orderedConcatenationList = null;
|
|
||||||
this._identifier = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Compilation} compilation the compilation
|
* Assuming this module is in the cache. Update the (cached) module with
|
||||||
|
* the fresh module from the factory. Usually updates internal references
|
||||||
|
* and properties.
|
||||||
|
* @param {Module} module fresh module
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
attach(compilation) {
|
updateCacheModule(module) {
|
||||||
const { rootModule, _modules: modules } = this;
|
super.updateCacheModule(module);
|
||||||
this._orderedConcatenationList = ConcatenatedModule._createConcatenationList(
|
const m = /** @type {ConcatenatedModule} */ (module);
|
||||||
rootModule,
|
this._identifier = m._identifier;
|
||||||
modules,
|
this.rootModule = m.rootModule;
|
||||||
compilation
|
this._modules = m._modules;
|
||||||
);
|
this._orderedConcatenationList = m._orderedConcatenationList;
|
||||||
for (const info of this._orderedConcatenationList) {
|
|
||||||
if (info.type === "concatenated") {
|
|
||||||
const m = info.module;
|
|
||||||
|
|
||||||
// populate dependencies
|
|
||||||
for (const d of m.dependencies.filter(
|
|
||||||
dep =>
|
|
||||||
!(dep instanceof HarmonyImportDependency) ||
|
|
||||||
!modules.has(compilation.moduleGraph.getModule(dep))
|
|
||||||
)) {
|
|
||||||
this.dependencies.push(d);
|
|
||||||
}
|
|
||||||
if (m.presentationalDependencies !== undefined) {
|
|
||||||
for (const d of m.presentationalDependencies.filter(
|
|
||||||
dep =>
|
|
||||||
!(dep instanceof HarmonyImportDependency) ||
|
|
||||||
!modules.has(compilation.moduleGraph.getModule(dep))
|
|
||||||
)) {
|
|
||||||
this.addPresentationalDependency(d);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// populate file dependencies
|
|
||||||
if (m.buildInfo.fileDependencies) {
|
|
||||||
this.buildInfo.fileDependencies.addAll(m.buildInfo.fileDependencies);
|
|
||||||
}
|
|
||||||
// populate context dependencies
|
|
||||||
if (m.buildInfo.contextDependencies) {
|
|
||||||
this.buildInfo.contextDependencies.addAll(
|
|
||||||
m.buildInfo.contextDependencies
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// populate missing dependencies
|
|
||||||
if (m.buildInfo.missingDependencies) {
|
|
||||||
this.buildInfo.missingDependencies.addAll(
|
|
||||||
m.buildInfo.missingDependencies
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// populate warnings
|
|
||||||
const warnings = m.getWarnings();
|
|
||||||
if (warnings !== undefined) {
|
|
||||||
for (const warning of warnings) {
|
|
||||||
this.addWarning(warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// populate errors
|
|
||||||
const errors = m.getErrors();
|
|
||||||
if (errors !== undefined) {
|
|
||||||
for (const error of errors) {
|
|
||||||
this.addError(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m.buildInfo.assets) {
|
|
||||||
if (this.buildInfo.assets === undefined) {
|
|
||||||
this.buildInfo.assets = Object.create(null);
|
|
||||||
}
|
|
||||||
Object.assign(this.buildInfo.assets, m.buildInfo.assets);
|
|
||||||
}
|
|
||||||
if (m.buildInfo.assetsInfo) {
|
|
||||||
if (this.buildInfo.assetsInfo === undefined) {
|
|
||||||
this.buildInfo.assetsInfo = new Map();
|
|
||||||
}
|
|
||||||
for (const [key, value] of m.buildInfo.assetsInfo) {
|
|
||||||
this.buildInfo.assetsInfo.set(key, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this._identifier = this._createIdentifier(compilation.compiler.root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {Set<string>} types availiable (do not mutate)
|
* @returns {Set<string>} types availiable (do not mutate)
|
||||||
*/
|
*/
|
||||||
|
@ -697,7 +647,7 @@ class ConcatenatedModule extends Module {
|
||||||
readableIdentifier(requestShortener) {
|
readableIdentifier(requestShortener) {
|
||||||
return (
|
return (
|
||||||
this.rootModule.readableIdentifier(requestShortener) +
|
this.rootModule.readableIdentifier(requestShortener) +
|
||||||
` + ${this._numberOfConcatenatedModules - 1} modules`
|
` + ${this._modules.size - 1} modules`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,7 +675,90 @@ class ConcatenatedModule extends Module {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
build(options, compilation, resolver, fs, callback) {
|
build(options, compilation, resolver, fs, callback) {
|
||||||
throw new Error("Cannot build this module. It should be already built.");
|
const { rootModule } = this;
|
||||||
|
this.buildInfo = {
|
||||||
|
strict: true,
|
||||||
|
cacheable: true,
|
||||||
|
moduleArgument: rootModule.buildInfo.moduleArgument,
|
||||||
|
exportsArgument: rootModule.buildInfo.exportsArgument,
|
||||||
|
fileDependencies: new LazySet(),
|
||||||
|
contextDependencies: new LazySet(),
|
||||||
|
missingDependencies: new LazySet(),
|
||||||
|
assets: undefined
|
||||||
|
};
|
||||||
|
this.buildMeta = rootModule.buildMeta;
|
||||||
|
this.clearDependenciesAndBlocks();
|
||||||
|
this.clearWarningsAndErrors();
|
||||||
|
|
||||||
|
for (const info of this._orderedConcatenationList) {
|
||||||
|
if (info.type === "concatenated") {
|
||||||
|
const m = info.module;
|
||||||
|
|
||||||
|
// populate cacheable
|
||||||
|
if (!m.buildInfo.cacheable) {
|
||||||
|
this.buildInfo.cacheable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// populate dependencies
|
||||||
|
for (const d of m.dependencies.filter(
|
||||||
|
dep =>
|
||||||
|
!(dep instanceof HarmonyImportDependency) ||
|
||||||
|
!this._modules.has(compilation.moduleGraph.getModule(dep))
|
||||||
|
)) {
|
||||||
|
this.dependencies.push(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
// populate file dependencies
|
||||||
|
if (m.buildInfo.fileDependencies) {
|
||||||
|
this.buildInfo.fileDependencies.addAll(m.buildInfo.fileDependencies);
|
||||||
|
}
|
||||||
|
// populate context dependencies
|
||||||
|
if (m.buildInfo.contextDependencies) {
|
||||||
|
this.buildInfo.contextDependencies.addAll(
|
||||||
|
m.buildInfo.contextDependencies
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// populate missing dependencies
|
||||||
|
if (m.buildInfo.missingDependencies) {
|
||||||
|
this.buildInfo.missingDependencies.addAll(
|
||||||
|
m.buildInfo.missingDependencies
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// populate warnings
|
||||||
|
const warnings = m.getWarnings();
|
||||||
|
if (warnings !== undefined) {
|
||||||
|
for (const warning of warnings) {
|
||||||
|
this.addWarning(warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// populate errors
|
||||||
|
const errors = m.getErrors();
|
||||||
|
if (errors !== undefined) {
|
||||||
|
for (const error of errors) {
|
||||||
|
this.addError(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// populate assets
|
||||||
|
if (m.buildInfo.assets) {
|
||||||
|
if (this.buildInfo.assets === undefined) {
|
||||||
|
this.buildInfo.assets = Object.create(null);
|
||||||
|
}
|
||||||
|
Object.assign(this.buildInfo.assets, m.buildInfo.assets);
|
||||||
|
}
|
||||||
|
if (m.buildInfo.assetsInfo) {
|
||||||
|
if (this.buildInfo.assetsInfo === undefined) {
|
||||||
|
this.buildInfo.assetsInfo = new Map();
|
||||||
|
}
|
||||||
|
for (const [key, value] of m.buildInfo.assetsInfo) {
|
||||||
|
this.buildInfo.assetsInfo.set(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -749,12 +782,10 @@ class ConcatenatedModule extends Module {
|
||||||
* @private
|
* @private
|
||||||
* @param {Module} rootModule the root of the concatenation
|
* @param {Module} rootModule the root of the concatenation
|
||||||
* @param {Set<Module>} modulesSet a set of modules which should be concatenated
|
* @param {Set<Module>} modulesSet a set of modules which should be concatenated
|
||||||
* @param {Compilation} compilation the compilation context
|
* @param {ModuleGraph} moduleGraph the module graph
|
||||||
* @returns {ConcatenationEntry[]} concatenation list
|
* @returns {ConcatenationEntry[]} concatenation list
|
||||||
*/
|
*/
|
||||||
static _createConcatenationList(rootModule, modulesSet, compilation) {
|
static _createConcatenationList(rootModule, modulesSet, moduleGraph) {
|
||||||
const { moduleGraph } = compilation;
|
|
||||||
|
|
||||||
const list = [];
|
const list = [];
|
||||||
const set = new Set();
|
const set = new Set();
|
||||||
|
|
||||||
|
@ -813,13 +844,17 @@ class ConcatenatedModule extends Module {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
_createIdentifier(associatedObjectForCache) {
|
static _createIdentifier(
|
||||||
|
rootModule,
|
||||||
|
orderedConcatenationList,
|
||||||
|
associatedObjectForCache
|
||||||
|
) {
|
||||||
let orderedConcatenationListIdentifiers = "";
|
let orderedConcatenationListIdentifiers = "";
|
||||||
for (let i = 0; i < this._orderedConcatenationList.length; i++) {
|
for (let i = 0; i < orderedConcatenationList.length; i++) {
|
||||||
if (this._orderedConcatenationList[i].type === "concatenated") {
|
if (orderedConcatenationList[i].type === "concatenated") {
|
||||||
orderedConcatenationListIdentifiers += contextify(
|
orderedConcatenationListIdentifiers += contextify(
|
||||||
this.rootModule.context,
|
rootModule.context,
|
||||||
this._orderedConcatenationList[i].module.identifier(),
|
orderedConcatenationList[i].module.identifier(),
|
||||||
associatedObjectForCache
|
associatedObjectForCache
|
||||||
);
|
);
|
||||||
orderedConcatenationListIdentifiers += " ";
|
orderedConcatenationListIdentifiers += " ";
|
||||||
|
@ -827,7 +862,7 @@ class ConcatenatedModule extends Module {
|
||||||
}
|
}
|
||||||
const hash = createHash("md4");
|
const hash = createHash("md4");
|
||||||
hash.update(orderedConcatenationListIdentifiers);
|
hash.update(orderedConcatenationListIdentifiers);
|
||||||
return this.rootModule.identifier() + "|" + hash.digest("hex");
|
return rootModule.identifier() + "|" + hash.digest("hex");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1425,18 +1460,18 @@ class ConcatenatedModule extends Module {
|
||||||
|
|
||||||
serialize(context) {
|
serialize(context) {
|
||||||
const { write } = context;
|
const { write } = context;
|
||||||
// constructor
|
|
||||||
write(this.rootModule);
|
|
||||||
write(this.modules);
|
|
||||||
// deserialize
|
|
||||||
write(this._cachedCodeGenerationHash);
|
write(this._cachedCodeGenerationHash);
|
||||||
write(this._cachedCodeGeneration);
|
write(this._cachedCodeGeneration);
|
||||||
super.serialize(context);
|
super.serialize(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static deserialize(context) {
|
static deserialize(context) {
|
||||||
const { read } = context;
|
const obj = new ConcatenatedModule({
|
||||||
const obj = new ConcatenatedModule(read(), new Set(read()));
|
identifier: undefined,
|
||||||
|
rootModule: undefined,
|
||||||
|
orderedConcatenationList: undefined,
|
||||||
|
modules: undefined
|
||||||
|
});
|
||||||
obj.deserialize(context);
|
obj.deserialize(context);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ const asyncLib = require("neo-async");
|
||||||
const ChunkGraph = require("../ChunkGraph");
|
const ChunkGraph = require("../ChunkGraph");
|
||||||
const ModuleGraph = require("../ModuleGraph");
|
const ModuleGraph = require("../ModuleGraph");
|
||||||
const ModuleRestoreError = require("../ModuleRestoreError");
|
const ModuleRestoreError = require("../ModuleRestoreError");
|
||||||
|
const ModuleStoreError = require("../ModuleStoreError");
|
||||||
const { STAGE_DEFAULT } = require("../OptimizationStages");
|
const { STAGE_DEFAULT } = require("../OptimizationStages");
|
||||||
const HarmonyCompatibilityDependency = require("../dependencies/HarmonyCompatibilityDependency");
|
const HarmonyCompatibilityDependency = require("../dependencies/HarmonyCompatibilityDependency");
|
||||||
const HarmonyImportDependency = require("../dependencies/HarmonyImportDependency");
|
const HarmonyImportDependency = require("../dependencies/HarmonyImportDependency");
|
||||||
|
@ -106,10 +107,12 @@ class ModuleConcatenationPlugin {
|
||||||
name: "ModuleConcatenationPlugin",
|
name: "ModuleConcatenationPlugin",
|
||||||
stage: STAGE_DEFAULT
|
stage: STAGE_DEFAULT
|
||||||
},
|
},
|
||||||
(allChunks, modules, cb) => {
|
(allChunks, modules, callback) => {
|
||||||
|
const logger = compilation.getLogger("ModuleConcatenationPlugin");
|
||||||
const chunkGraph = compilation.chunkGraph;
|
const chunkGraph = compilation.chunkGraph;
|
||||||
const relevantModules = [];
|
const relevantModules = [];
|
||||||
const possibleInners = new Set();
|
const possibleInners = new Set();
|
||||||
|
logger.time("select relevant modules");
|
||||||
for (const module of modules) {
|
for (const module of modules) {
|
||||||
// Only harmony modules are valid for optimization
|
// Only harmony modules are valid for optimization
|
||||||
if (
|
if (
|
||||||
|
@ -272,12 +275,20 @@ class ModuleConcatenationPlugin {
|
||||||
|
|
||||||
possibleInners.add(module);
|
possibleInners.add(module);
|
||||||
}
|
}
|
||||||
|
logger.timeEnd("select relevant modules");
|
||||||
|
logger.debug(
|
||||||
|
`${relevantModules.length} potential root modules, ${possibleInners.size} potential inner modules`
|
||||||
|
);
|
||||||
// sort by depth
|
// sort by depth
|
||||||
// modules with lower depth are more likely suited as roots
|
// modules with lower depth are more likely suited as roots
|
||||||
// this improves performance, because modules already selected as inner are skipped
|
// this improves performance, because modules already selected as inner are skipped
|
||||||
|
logger.time("sort relevant modules");
|
||||||
relevantModules.sort((a, b) => {
|
relevantModules.sort((a, b) => {
|
||||||
return moduleGraph.getDepth(a) - moduleGraph.getDepth(b);
|
return moduleGraph.getDepth(a) - moduleGraph.getDepth(b);
|
||||||
});
|
});
|
||||||
|
logger.timeEnd("sort relevant modules");
|
||||||
|
|
||||||
|
logger.time("find modules to concatenate");
|
||||||
const concatConfigurations = [];
|
const concatConfigurations = [];
|
||||||
const usedAsInner = new Set();
|
const usedAsInner = new Set();
|
||||||
for (const currentRoot of relevantModules) {
|
for (const currentRoot of relevantModules) {
|
||||||
|
@ -291,18 +302,33 @@ class ModuleConcatenationPlugin {
|
||||||
// cache failures to add modules
|
// cache failures to add modules
|
||||||
const failureCache = new Map();
|
const failureCache = new Map();
|
||||||
|
|
||||||
|
// potential optional import candiates
|
||||||
|
/** @type {Set<Module>} */
|
||||||
|
const candidates = new Set();
|
||||||
|
|
||||||
// try to add all imports
|
// try to add all imports
|
||||||
for (const imp of this._getImports(compilation, currentRoot)) {
|
for (const imp of this._getImports(compilation, currentRoot)) {
|
||||||
|
candidates.add(imp);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const imp of candidates) {
|
||||||
|
// _tryToAdd modifies the config even if it fails
|
||||||
|
// so make sure to only accept changes when it succeed
|
||||||
|
const backup = currentConfiguration.snapshot();
|
||||||
const problem = this._tryToAdd(
|
const problem = this._tryToAdd(
|
||||||
compilation,
|
compilation,
|
||||||
currentConfiguration,
|
currentConfiguration,
|
||||||
imp,
|
imp,
|
||||||
possibleInners,
|
possibleInners,
|
||||||
|
candidates,
|
||||||
failureCache
|
failureCache
|
||||||
);
|
);
|
||||||
if (problem) {
|
if (problem) {
|
||||||
failureCache.set(imp, problem);
|
failureCache.set(imp, problem);
|
||||||
currentConfiguration.addWarning(imp, problem);
|
currentConfiguration.addWarning(imp, problem);
|
||||||
|
|
||||||
|
// roll back
|
||||||
|
currentConfiguration.rollback(backup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!currentConfiguration.isEmpty()) {
|
if (!currentConfiguration.isEmpty()) {
|
||||||
|
@ -313,42 +339,91 @@ class ModuleConcatenationPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
const optimizationBailouts = moduleGraph.getOptimizationBailout(
|
||||||
|
currentRoot
|
||||||
|
);
|
||||||
for (const warning of currentConfiguration.getWarningsSorted()) {
|
for (const warning of currentConfiguration.getWarningsSorted()) {
|
||||||
moduleGraph
|
optimizationBailouts.push(
|
||||||
.getOptimizationBailout(currentRoot)
|
formatBailoutWarning(warning[0], warning[1])
|
||||||
.push(formatBailoutWarning(warning[0], warning[1]));
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger.timeEnd("find modules to concatenate");
|
||||||
|
logger.debug(
|
||||||
|
`${concatConfigurations.length} concat configurations`
|
||||||
|
);
|
||||||
// HACK: Sort configurations by length and start with the longest one
|
// HACK: Sort configurations by length and start with the longest one
|
||||||
// to get the biggers groups possible. Used modules are marked with usedModules
|
// to get the biggers groups possible. Used modules are marked with usedModules
|
||||||
// TODO: Allow to reuse existing configuration while trying to add dependencies.
|
// TODO: Allow to reuse existing configuration while trying to add dependencies.
|
||||||
// This would improve performance. O(n^2) -> O(n)
|
// This would improve performance. O(n^2) -> O(n)
|
||||||
|
logger.time(`sort concat configurations`);
|
||||||
concatConfigurations.sort((a, b) => {
|
concatConfigurations.sort((a, b) => {
|
||||||
return b.modules.size - a.modules.size;
|
return b.modules.size - a.modules.size;
|
||||||
});
|
});
|
||||||
|
logger.timeEnd(`sort concat configurations`);
|
||||||
const usedModules = new Set();
|
const usedModules = new Set();
|
||||||
|
|
||||||
|
logger.time("create concatenated modules");
|
||||||
asyncLib.each(
|
asyncLib.each(
|
||||||
concatConfigurations,
|
concatConfigurations,
|
||||||
(concatConfiguration, cb) => {
|
(concatConfiguration, callback) => {
|
||||||
if (usedModules.has(concatConfiguration.rootModule))
|
|
||||||
return cb();
|
|
||||||
const modules = concatConfiguration.getModules();
|
|
||||||
const rootModule = concatConfiguration.rootModule;
|
const rootModule = concatConfiguration.rootModule;
|
||||||
let newModule = new ConcatenatedModule(rootModule, modules);
|
|
||||||
newModule.attach(compilation);
|
// Avoid overlapping configurations
|
||||||
|
// TODO: remove this when todo above is fixed
|
||||||
|
if (usedModules.has(rootModule)) return callback();
|
||||||
|
const modules = concatConfiguration.getModules();
|
||||||
|
for (const m of modules) {
|
||||||
|
usedModules.add(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new ConcatenatedModule
|
||||||
|
let newModule = ConcatenatedModule.createFromModuleGraph(
|
||||||
|
rootModule,
|
||||||
|
modules,
|
||||||
|
moduleGraph,
|
||||||
|
compiler.root
|
||||||
|
);
|
||||||
|
|
||||||
|
// get name for caching
|
||||||
const identifier = newModule.identifier();
|
const identifier = newModule.identifier();
|
||||||
const cacheName = `${compilation.compilerPath}/concatModule/${identifier}`;
|
const cacheName = `${compilation.compilerPath}/ModuleConcatenationPlugin/${identifier}`;
|
||||||
compilation.cache.get(cacheName, null, (err, cacheModule) => {
|
|
||||||
if (err) return cb(new ModuleRestoreError(newModule, err));
|
|
||||||
|
|
||||||
if (cacheModule) {
|
const restore = () => {
|
||||||
cacheModule.updateCacheModule(newModule);
|
compilation.cache.get(cacheName, null, (err, cacheModule) => {
|
||||||
newModule = cacheModule;
|
if (err) {
|
||||||
newModule.attach(compilation);
|
return callback(new ModuleRestoreError(newModule, err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cacheModule) {
|
||||||
|
cacheModule.updateCacheModule(newModule);
|
||||||
|
newModule = cacheModule;
|
||||||
|
}
|
||||||
|
|
||||||
|
build();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const build = () => {
|
||||||
|
newModule.build(
|
||||||
|
compiler.options,
|
||||||
|
compilation,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
err => {
|
||||||
|
if (err) {
|
||||||
|
if (!err.module) {
|
||||||
|
err.module = newModule;
|
||||||
|
}
|
||||||
|
return callback(err);
|
||||||
|
}
|
||||||
|
integrateAndStore();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const integrateAndStore = () => {
|
||||||
ChunkGraph.setChunkGraphForModule(newModule, chunkGraph);
|
ChunkGraph.setChunkGraphForModule(newModule, chunkGraph);
|
||||||
ModuleGraph.setModuleGraphForModule(newModule, moduleGraph);
|
ModuleGraph.setModuleGraphForModule(newModule, moduleGraph);
|
||||||
for (const warning of concatConfiguration.getWarningsSorted()) {
|
for (const warning of concatConfiguration.getWarningsSorted()) {
|
||||||
|
@ -359,7 +434,7 @@ class ModuleConcatenationPlugin {
|
||||||
moduleGraph.cloneModuleAttributes(rootModule, newModule);
|
moduleGraph.cloneModuleAttributes(rootModule, newModule);
|
||||||
for (const m of modules) {
|
for (const m of modules) {
|
||||||
compilation.modules.delete(m);
|
compilation.modules.delete(m);
|
||||||
usedModules.add(m);
|
|
||||||
// add to builtModules when one of the included modules was built
|
// add to builtModules when one of the included modules was built
|
||||||
if (compilation.builtModules.has(m)) {
|
if (compilation.builtModules.has(m)) {
|
||||||
compilation.builtModules.add(newModule);
|
compilation.builtModules.add(newModule);
|
||||||
|
@ -379,13 +454,20 @@ class ModuleConcatenationPlugin {
|
||||||
compilation.modules.add(newModule);
|
compilation.modules.add(newModule);
|
||||||
|
|
||||||
compilation.cache.store(cacheName, null, newModule, err => {
|
compilation.cache.store(cacheName, null, newModule, err => {
|
||||||
if (err) return cb(new ModuleRestoreError(newModule, err));
|
if (err) {
|
||||||
|
return callback(new ModuleStoreError(newModule, err));
|
||||||
|
}
|
||||||
|
|
||||||
cb();
|
callback();
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
|
|
||||||
|
restore();
|
||||||
},
|
},
|
||||||
cb
|
err => {
|
||||||
|
logger.timeEnd("create concatenated modules");
|
||||||
|
process.nextTick(() => callback(err));
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -426,10 +508,18 @@ class ModuleConcatenationPlugin {
|
||||||
* @param {ConcatConfiguration} config concat configuration (will be modified when added)
|
* @param {ConcatConfiguration} config concat configuration (will be modified when added)
|
||||||
* @param {Module} module the module to be added
|
* @param {Module} module the module to be added
|
||||||
* @param {Set<Module>} possibleModules modules that are candidates
|
* @param {Set<Module>} possibleModules modules that are candidates
|
||||||
|
* @param {Set<Module>} candidates list of potential candidates (will be added to)
|
||||||
* @param {Map<Module, Module>} failureCache cache for problematic modules to be more performant
|
* @param {Map<Module, Module>} failureCache cache for problematic modules to be more performant
|
||||||
* @returns {Module} the problematic module
|
* @returns {Module} the problematic module
|
||||||
*/
|
*/
|
||||||
_tryToAdd(compilation, config, module, possibleModules, failureCache) {
|
_tryToAdd(
|
||||||
|
compilation,
|
||||||
|
config,
|
||||||
|
module,
|
||||||
|
possibleModules,
|
||||||
|
candidates,
|
||||||
|
failureCache
|
||||||
|
) {
|
||||||
const cacheEntry = failureCache.get(module);
|
const cacheEntry = failureCache.get(module);
|
||||||
if (cacheEntry) {
|
if (cacheEntry) {
|
||||||
return cacheEntry;
|
return cacheEntry;
|
||||||
|
@ -446,11 +536,8 @@ class ModuleConcatenationPlugin {
|
||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clone config to make experimental changes
|
|
||||||
const testConfig = config.clone();
|
|
||||||
|
|
||||||
// Add the module
|
// Add the module
|
||||||
testConfig.add(module);
|
config.add(module);
|
||||||
|
|
||||||
const moduleGraph = compilation.moduleGraph;
|
const moduleGraph = compilation.moduleGraph;
|
||||||
|
|
||||||
|
@ -461,9 +548,10 @@ class ModuleConcatenationPlugin {
|
||||||
|
|
||||||
const problem = this._tryToAdd(
|
const problem = this._tryToAdd(
|
||||||
compilation,
|
compilation,
|
||||||
testConfig,
|
config,
|
||||||
connection.originModule,
|
connection.originModule,
|
||||||
possibleModules,
|
possibleModules,
|
||||||
|
candidates,
|
||||||
failureCache
|
failureCache
|
||||||
);
|
);
|
||||||
if (problem) {
|
if (problem) {
|
||||||
|
@ -472,21 +560,9 @@ class ModuleConcatenationPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit experimental changes
|
// Add imports to possible candiates list
|
||||||
config.set(testConfig);
|
|
||||||
|
|
||||||
// Eagerly try to add imports too if possible
|
|
||||||
for (const imp of this._getImports(compilation, module)) {
|
for (const imp of this._getImports(compilation, module)) {
|
||||||
const problem = this._tryToAdd(
|
candidates.add(imp);
|
||||||
compilation,
|
|
||||||
config,
|
|
||||||
imp,
|
|
||||||
possibleModules,
|
|
||||||
failureCache
|
|
||||||
);
|
|
||||||
if (problem) {
|
|
||||||
config.addWarning(imp, problem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -496,22 +572,14 @@ class ConcatConfiguration {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Module} rootModule the root module
|
* @param {Module} rootModule the root module
|
||||||
* @param {ConcatConfiguration=} cloneFrom base config
|
|
||||||
*/
|
*/
|
||||||
constructor(rootModule, cloneFrom) {
|
constructor(rootModule) {
|
||||||
this.rootModule = rootModule;
|
this.rootModule = rootModule;
|
||||||
if (cloneFrom) {
|
/** @type {StackedMap<Module, true>} */
|
||||||
/** @type {StackedMap<Module, true>} */
|
this.modules = new StackedMap();
|
||||||
this.modules = cloneFrom.modules.createChild();
|
this.modules.set(rootModule, true);
|
||||||
/** @type {StackedMap<Module, Module>} */
|
/** @type {StackedMap<Module, Module>} */
|
||||||
this.warnings = cloneFrom.warnings.createChild();
|
this.warnings = new StackedMap();
|
||||||
} else {
|
|
||||||
/** @type {StackedMap<Module, true>} */
|
|
||||||
this.modules = new StackedMap();
|
|
||||||
this.modules.set(rootModule, true);
|
|
||||||
/** @type {StackedMap<Module, Module>} */
|
|
||||||
this.warnings = new StackedMap();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add(module) {
|
add(module) {
|
||||||
|
@ -549,14 +617,14 @@ class ConcatConfiguration {
|
||||||
return this.modules.asSet();
|
return this.modules.asSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
clone() {
|
snapshot() {
|
||||||
return new ConcatConfiguration(this.rootModule, this);
|
const base = this.modules;
|
||||||
|
this.modules = this.modules.createChild();
|
||||||
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
set(config) {
|
rollback(snapshot) {
|
||||||
this.rootModule = config.rootModule;
|
this.modules = snapshot;
|
||||||
this.modules = config.modules;
|
|
||||||
this.warnings = config.warnings;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -641,26 +641,26 @@ Entrypoint entry-1 = vendor-1.js entry-1.js
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StatsTestCases should print correct stats for commons-plugin-issue-4980 1`] = `
|
exports[`StatsTestCases should print correct stats for commons-plugin-issue-4980 1`] = `
|
||||||
"Hash: cc1067a9ed68395a22d361ebf4f77d289ef5d090
|
"Hash: 369dce9696722aff8630778eed1bb35adfdf68ee
|
||||||
Child
|
Child
|
||||||
Hash: cc1067a9ed68395a22d3
|
Hash: 369dce9696722aff8630
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
app.e7c3ca90761b75404b15-1.js 5.86 KiB [emitted] [immutable] [name: app]
|
app.28702b7a86e378694d09-1.js 5.86 KiB [emitted] [immutable] [name: app]
|
||||||
vendor.611fd9bad8fe7de29fe7-1.js 615 bytes [emitted] [immutable] [name: vendor] [id hint: vendor]
|
vendor.611fd9bad8fe7de29fe7-1.js 615 bytes [emitted] [immutable] [name: vendor] [id hint: vendor]
|
||||||
Entrypoint app = vendor.611fd9bad8fe7de29fe7-1.js app.e7c3ca90761b75404b15-1.js
|
Entrypoint app = vendor.611fd9bad8fe7de29fe7-1.js app.28702b7a86e378694d09-1.js
|
||||||
./entry-1.js + 2 modules 190 bytes [built]
|
./entry-1.js + 2 modules 190 bytes [built]
|
||||||
./constants.js 87 bytes [built]
|
./constants.js 87 bytes [built]
|
||||||
+ 3 hidden modules
|
+ 3 hidden modules
|
||||||
Child
|
Child
|
||||||
Hash: 61ebf4f77d289ef5d090
|
Hash: 778eed1bb35adfdf68ee
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
app.3543b1c65e6a5b58cae6-2.js 5.87 KiB [emitted] [immutable] [name: app]
|
app.11dd0b201bfcb5fa156a-2.js 5.87 KiB [emitted] [immutable] [name: app]
|
||||||
vendor.611fd9bad8fe7de29fe7-2.js 615 bytes [emitted] [immutable] [name: vendor] [id hint: vendor]
|
vendor.611fd9bad8fe7de29fe7-2.js 615 bytes [emitted] [immutable] [name: vendor] [id hint: vendor]
|
||||||
Entrypoint app = vendor.611fd9bad8fe7de29fe7-2.js app.3543b1c65e6a5b58cae6-2.js
|
Entrypoint app = vendor.611fd9bad8fe7de29fe7-2.js app.11dd0b201bfcb5fa156a-2.js
|
||||||
./entry-2.js + 2 modules 197 bytes [built]
|
./entry-2.js + 2 modules 197 bytes [built]
|
||||||
./constants.js 87 bytes [built]
|
./constants.js 87 bytes [built]
|
||||||
+ 3 hidden modules"
|
+ 3 hidden modules"
|
||||||
|
@ -684,52 +684,52 @@ exports[`StatsTestCases should print correct stats for concat-and-sideeffects 1`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StatsTestCases should print correct stats for context-independence 1`] = `
|
exports[`StatsTestCases should print correct stats for context-independence 1`] = `
|
||||||
"Hash: 6506665a35d2ca5d31ac6506665a35d2ca5d31accf181f0e0e06350b116acf181f0e0e06350b116a
|
"Hash: 3bbcc69a5b6015de0e133bbcc69a5b6015de0e13b817462215fe98066a27b817462215fe98066a27
|
||||||
Child
|
Child
|
||||||
Hash: 6506665a35d2ca5d31ac
|
Hash: 3bbcc69a5b6015de0e13
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
703-3e2afd6460ceb1cd6f5f.js 438 bytes [emitted] [immutable]
|
703-97267ca95e3cfbc183d4.js 438 bytes [emitted] [immutable]
|
||||||
703-3e2afd6460ceb1cd6f5f.js.map 343 bytes [emitted] [dev]
|
703-97267ca95e3cfbc183d4.js.map 343 bytes [emitted] [dev]
|
||||||
main-a1003986d61ab330d2c5.js 8.14 KiB [emitted] [immutable] [name: main]
|
main-6b11eb1f2bbfff254738.js 8.14 KiB [emitted] [immutable] [name: main]
|
||||||
main-a1003986d61ab330d2c5.js.map 7.2 KiB [emitted] [dev] [name: (main)]
|
main-6b11eb1f2bbfff254738.js.map 7.2 KiB [emitted] [dev] [name: (main)]
|
||||||
Entrypoint main = main-a1003986d61ab330d2c5.js (main-a1003986d61ab330d2c5.js.map)
|
Entrypoint main = main-6b11eb1f2bbfff254738.js (main-6b11eb1f2bbfff254738.js.map)
|
||||||
./a/index.js 40 bytes [built]
|
./a/index.js 40 bytes [built]
|
||||||
./a/chunk.js + 1 modules 66 bytes [built]
|
./a/chunk.js + 1 modules 66 bytes [built]
|
||||||
+ 6 hidden modules
|
+ 6 hidden modules
|
||||||
Child
|
Child
|
||||||
Hash: 6506665a35d2ca5d31ac
|
Hash: 3bbcc69a5b6015de0e13
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
703-3e2afd6460ceb1cd6f5f.js 438 bytes [emitted] [immutable]
|
703-97267ca95e3cfbc183d4.js 438 bytes [emitted] [immutable]
|
||||||
703-3e2afd6460ceb1cd6f5f.js.map 343 bytes [emitted] [dev]
|
703-97267ca95e3cfbc183d4.js.map 343 bytes [emitted] [dev]
|
||||||
main-a1003986d61ab330d2c5.js 8.14 KiB [emitted] [immutable] [name: main]
|
main-6b11eb1f2bbfff254738.js 8.14 KiB [emitted] [immutable] [name: main]
|
||||||
main-a1003986d61ab330d2c5.js.map 7.2 KiB [emitted] [dev] [name: (main)]
|
main-6b11eb1f2bbfff254738.js.map 7.2 KiB [emitted] [dev] [name: (main)]
|
||||||
Entrypoint main = main-a1003986d61ab330d2c5.js (main-a1003986d61ab330d2c5.js.map)
|
Entrypoint main = main-6b11eb1f2bbfff254738.js (main-6b11eb1f2bbfff254738.js.map)
|
||||||
./b/index.js 40 bytes [built]
|
./b/index.js 40 bytes [built]
|
||||||
./b/chunk.js + 1 modules 66 bytes [built]
|
./b/chunk.js + 1 modules 66 bytes [built]
|
||||||
+ 6 hidden modules
|
+ 6 hidden modules
|
||||||
Child
|
Child
|
||||||
Hash: cf181f0e0e06350b116a
|
Hash: b817462215fe98066a27
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
703-d51a9ad771055bba3447.js 962 bytes [emitted] [immutable]
|
703-e96ad695ea376e8e9157.js 962 bytes [emitted] [immutable]
|
||||||
main-f8577eeb56b10147974d.js 8.48 KiB [emitted] [immutable] [name: main]
|
main-856478c0c82303c87701.js 8.48 KiB [emitted] [immutable] [name: main]
|
||||||
Entrypoint main = main-f8577eeb56b10147974d.js
|
Entrypoint main = main-856478c0c82303c87701.js
|
||||||
./a/index.js 40 bytes [built]
|
./a/index.js 40 bytes [built]
|
||||||
./a/chunk.js + 1 modules 66 bytes [built]
|
./a/chunk.js + 1 modules 66 bytes [built]
|
||||||
+ 6 hidden modules
|
+ 6 hidden modules
|
||||||
Child
|
Child
|
||||||
Hash: cf181f0e0e06350b116a
|
Hash: b817462215fe98066a27
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
703-d51a9ad771055bba3447.js 962 bytes [emitted] [immutable]
|
703-e96ad695ea376e8e9157.js 962 bytes [emitted] [immutable]
|
||||||
main-f8577eeb56b10147974d.js 8.48 KiB [emitted] [immutable] [name: main]
|
main-856478c0c82303c87701.js 8.48 KiB [emitted] [immutable] [name: main]
|
||||||
Entrypoint main = main-f8577eeb56b10147974d.js
|
Entrypoint main = main-856478c0c82303c87701.js
|
||||||
./b/index.js 40 bytes [built]
|
./b/index.js 40 bytes [built]
|
||||||
./b/chunk.js + 1 modules 66 bytes [built]
|
./b/chunk.js + 1 modules 66 bytes [built]
|
||||||
+ 6 hidden modules"
|
+ 6 hidden modules"
|
||||||
|
@ -1588,7 +1588,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`] = `
|
exports[`StatsTestCases should print correct stats for module-reasons 1`] = `
|
||||||
"Hash: a74cbe7b899ea89c631e
|
"Hash: 7ad27c2fa358483a7fdd
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
|
@ -2441,6 +2441,14 @@ LOG from webpack.SplitChunksPlugin
|
||||||
<t> modules: Xms
|
<t> modules: Xms
|
||||||
<t> queue: Xms
|
<t> queue: Xms
|
||||||
<t> maxSize: Xms
|
<t> maxSize: Xms
|
||||||
|
|
||||||
|
LOG from ModuleConcatenationPlugin
|
||||||
|
<t> select relevant modules: Xms
|
||||||
|
<t> sort relevant modules: Xms
|
||||||
|
<t> find modules to concatenate: Xms
|
||||||
|
<t> sort concat configurations: Xms
|
||||||
|
<t> create concatenated modules: Xms
|
||||||
|
+ 2 hidden lines
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -2531,7 +2539,7 @@ Entrypoint e2 = runtime.js e2.js"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = `
|
exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = `
|
||||||
"Hash: ea361a8a1e8207bed262
|
"Hash: 419464d6e886f327e369
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Entrypoint index = index.js
|
Entrypoint index = index.js
|
||||||
|
@ -2561,7 +2569,7 @@ external \\"external\\" 42 bytes [built]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = `
|
exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = `
|
||||||
"Hash: e2c7355c011145721c930f50cdfccf67cfa8eb2a
|
"Hash: e2c7355c011145721c93cfe13e3565883e0c5a86
|
||||||
Child
|
Child
|
||||||
Hash: e2c7355c011145721c93
|
Hash: e2c7355c011145721c93
|
||||||
Time: Xms
|
Time: Xms
|
||||||
|
@ -2581,7 +2589,7 @@ Child
|
||||||
./common_lazy_shared.js 25 bytes [built]
|
./common_lazy_shared.js 25 bytes [built]
|
||||||
+ 12 hidden modules
|
+ 12 hidden modules
|
||||||
Child
|
Child
|
||||||
Hash: 0f50cdfccf67cfa8eb2a
|
Hash: cfe13e3565883e0c5a86
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Entrypoint first = b-vendor.js b-first.js
|
Entrypoint first = b-vendor.js b-first.js
|
||||||
|
@ -2608,7 +2616,7 @@ Child
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1`] = `
|
exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1`] = `
|
||||||
"Hash: dd7339ec873427ae72f9
|
"Hash: 9ee30c02e5810205c6ce
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
|
@ -2659,7 +2667,7 @@ Entrypoint main = main.js
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StatsTestCases should print correct stats for side-effects-simple-unused 1`] = `
|
exports[`StatsTestCases should print correct stats for side-effects-simple-unused 1`] = `
|
||||||
"Hash: 5e65a865b852c4d57af6
|
"Hash: bba4214f926bfb74bb29
|
||||||
Time: Xms
|
Time: Xms
|
||||||
Built at: 1970-04-20 12:42:42
|
Built at: 1970-04-20 12:42:42
|
||||||
Asset Size
|
Asset Size
|
||||||
|
|
Loading…
Reference in New Issue