mirror of https://github.com/webpack/webpack.git
more performance improvements
This commit is contained in:
parent
da29d21ae4
commit
f4ab7fc7e2
|
|
@ -7,7 +7,7 @@ try {
|
|||
fs.mkdirSync(fixtures);
|
||||
} catch(e) {}
|
||||
|
||||
for(var i = 0; i < 1000; i++) {
|
||||
for(var i = 0; i < 10000; i++) {
|
||||
var source = [];
|
||||
if(i > 8)
|
||||
source.push("require(" + JSON.stringify("./" + (i / 8 | 0) + ".js") + ");");
|
||||
|
|
@ -21,7 +21,7 @@ for(var i = 0; i < 1000; i++) {
|
|||
fs.writeFileSync(path.join(fixtures, i + ".js"), source.join("\n"), "utf-8");
|
||||
}
|
||||
|
||||
for(var i = 0; i < 1000; i++) {
|
||||
for(var i = 0; i < 10000; i++) {
|
||||
var source = [];
|
||||
source.push("require.ensure([], function(require) {");
|
||||
if(i > 8)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
fs.existsSync = fs.existsSync || path.existsSync;
|
||||
var resolve = require("enhanced-resolve");
|
||||
var interpret = require("interpret");
|
||||
var WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter");
|
||||
|
||||
|
|
@ -249,6 +248,7 @@ module.exports = function(yargs, argv, convertOptions) {
|
|||
|
||||
var path;
|
||||
try {
|
||||
var resolve = require("enhanced-resolve");
|
||||
path = resolve.sync(process.cwd(), name);
|
||||
} catch(e) {
|
||||
console.log("Cannot resolve plugin " + name + ".");
|
||||
|
|
|
|||
|
|
@ -316,7 +316,9 @@ Chunk.prototype.getChunkMaps = function(includeEntries, realHash) {
|
|||
};
|
||||
|
||||
function byId(a, b) {
|
||||
return a.id - b.id;
|
||||
if(a.id < b.id) return -1;
|
||||
if(b.id < a.id) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Chunk.prototype.sortItems = function() {
|
||||
|
|
@ -332,6 +334,8 @@ Chunk.prototype.sortItems = function() {
|
|||
if(origin.reasons)
|
||||
origin.reasons.sort();
|
||||
});
|
||||
this.parents.sort(byId);
|
||||
this.chunks.sort(byId);
|
||||
};
|
||||
|
||||
Chunk.prototype.toString = function() {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ Compilation.prototype.findModule = function(identifier) {
|
|||
|
||||
Compilation.prototype.buildModule = function(module, optional, origin, dependencies, thisCallback) {
|
||||
var _this = this;
|
||||
_this.applyPlugins("build-module", module);
|
||||
_this.applyPlugins1("build-module", module);
|
||||
if(module.building) return module.building.push(thisCallback);
|
||||
var building = module.building = [thisCallback];
|
||||
|
||||
|
|
@ -142,10 +142,10 @@ Compilation.prototype.buildModule = function(module, optional, origin, dependenc
|
|||
}, this);
|
||||
module.dependencies.sort(Dependency.compare);
|
||||
if(err) {
|
||||
_this.applyPlugins("failed-module", module, err);
|
||||
_this.applyPlugins2("failed-module", module, err);
|
||||
return callback(err);
|
||||
}
|
||||
_this.applyPlugins("succeed-module", module);
|
||||
_this.applyPlugins1("succeed-module", module);
|
||||
return callback();
|
||||
});
|
||||
};
|
||||
|
|
@ -509,7 +509,7 @@ Compilation.prototype.finish = function finish() {
|
|||
};
|
||||
|
||||
Compilation.prototype.unseal = function unseal() {
|
||||
this.applyPlugins("unseal");
|
||||
this.applyPlugins0("unseal");
|
||||
this.chunks.length = 0;
|
||||
this.namedChunks = {};
|
||||
this.additionalChunkAssets.length = 0;
|
||||
|
|
@ -533,13 +533,8 @@ Compilation.prototype.seal = function seal(callback) {
|
|||
chunk.addModule(module);
|
||||
module.addChunk(chunk);
|
||||
chunk.entryModule = module;
|
||||
if(typeof module.index !== "number") {
|
||||
module.index = self.nextFreeModuleIndex++;
|
||||
}
|
||||
self.assignIndex(module);
|
||||
self.processDependenciesBlockForChunk(module, chunk);
|
||||
if(typeof module.index2 !== "number") {
|
||||
module.index2 = self.nextFreeModuleIndex2++;
|
||||
}
|
||||
}, self);
|
||||
self.sortModules(self.modules);
|
||||
self.applyPlugins0("optimize");
|
||||
|
|
@ -583,7 +578,7 @@ Compilation.prototype.seal = function seal(callback) {
|
|||
self.applyPlugins1("optimize-chunk-ids", self.chunks);
|
||||
self.applyPlugins1("after-optimize-chunk-ids", self.chunks);
|
||||
|
||||
self.sortItemswithChunkIds();
|
||||
self.sortItemsWithChunkIds();
|
||||
|
||||
if(shouldRecord)
|
||||
self.applyPlugins2("record-modules", self.modules, self.records);
|
||||
|
|
@ -676,47 +671,112 @@ Compilation.prototype.addChunk = function addChunk(name, module, loc) {
|
|||
return chunk;
|
||||
};
|
||||
|
||||
Compilation.prototype.assignIndex = function assignIndex(module) {
|
||||
var _this = this;
|
||||
function assignIndexToModule(module) {
|
||||
// enter module
|
||||
if(typeof module.index !== "number") {
|
||||
module.index = _this.nextFreeModuleIndex++;
|
||||
|
||||
queue.push(function() {
|
||||
// leave module
|
||||
module.index2 = _this.nextFreeModuleIndex2++;
|
||||
});
|
||||
|
||||
// enter it as block
|
||||
assignIndexToDependencyBlock(module);
|
||||
}
|
||||
}
|
||||
function assignIndexToDependency(dependency) {
|
||||
if(dependency.module) {
|
||||
queue.push(function() {
|
||||
assignIndexToModule(dependency.module);
|
||||
});
|
||||
}
|
||||
}
|
||||
function assignIndexToDependencyBlock(block) {
|
||||
var allDependencies = [];
|
||||
|
||||
function iteratorDependency(d) {
|
||||
allDependencies.push(d);
|
||||
}
|
||||
function iteratorBlock(b) {
|
||||
queue.push(function() {
|
||||
assignIndexToDependencyBlock(b);
|
||||
});
|
||||
}
|
||||
|
||||
if(block.variables) {
|
||||
block.variables.forEach(function(v) {
|
||||
v.dependencies.forEach(iteratorDependency);
|
||||
});
|
||||
}
|
||||
if(block.dependencies) {
|
||||
block.dependencies.forEach(iteratorDependency);
|
||||
}
|
||||
if(block.blocks) {
|
||||
block.blocks.slice().reverse().forEach(iteratorBlock, this);
|
||||
}
|
||||
|
||||
allDependencies.reverse();
|
||||
allDependencies.forEach(function(d) {
|
||||
queue.push(function() {
|
||||
assignIndexToDependency(d);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var queue = [function() {
|
||||
assignIndexToModule(module);
|
||||
}];
|
||||
while(queue.length) {
|
||||
queue.pop()();
|
||||
}
|
||||
};
|
||||
|
||||
Compilation.prototype.processDependenciesBlockForChunk = function processDependenciesBlockForChunk(block, chunk) {
|
||||
if(block.variables) {
|
||||
block.variables.forEach(function(v) {
|
||||
v.dependencies.forEach(iteratorDependency, this);
|
||||
}, this);
|
||||
var queue = [[block, chunk]];
|
||||
while(queue.length) {
|
||||
var queueItem = queue.pop();
|
||||
block = queueItem[0];
|
||||
chunk = queueItem[1];
|
||||
if(block.variables) {
|
||||
block.variables.forEach(function(v) {
|
||||
v.dependencies.forEach(iteratorDependency, this);
|
||||
}, this);
|
||||
}
|
||||
if(block.dependencies) {
|
||||
block.dependencies.forEach(iteratorDependency, this);
|
||||
}
|
||||
if(block.blocks) {
|
||||
block.blocks.forEach(iteratorBlock, this);
|
||||
}
|
||||
}
|
||||
if(block.dependencies) {
|
||||
block.dependencies.forEach(iteratorDependency, this);
|
||||
}
|
||||
if(block.blocks) {
|
||||
block.blocks.forEach(function(b) {
|
||||
var c;
|
||||
if(!b.chunks) {
|
||||
c = this.addChunk(b.chunkName, b.module, b.loc);
|
||||
b.chunks = [c];
|
||||
c.addBlock(b);
|
||||
} else {
|
||||
c = b.chunks[0];
|
||||
}
|
||||
chunk.addChunk(c);
|
||||
c.addParent(chunk);
|
||||
this.processDependenciesBlockForChunk(b, c);
|
||||
}, this);
|
||||
|
||||
function iteratorBlock(b) {
|
||||
var c;
|
||||
if(!b.chunks) {
|
||||
c = this.addChunk(b.chunkName, b.module, b.loc);
|
||||
b.chunks = [c];
|
||||
c.addBlock(b);
|
||||
} else {
|
||||
c = b.chunks[0];
|
||||
}
|
||||
chunk.addChunk(c);
|
||||
c.addParent(chunk);
|
||||
queue.push([b, c]);
|
||||
}
|
||||
|
||||
function iteratorDependency(d) {
|
||||
if(!d.module) {
|
||||
return;
|
||||
}
|
||||
if(typeof d.module.index !== "number") {
|
||||
d.module.index = this.nextFreeModuleIndex++;
|
||||
}
|
||||
if(d.weak) {
|
||||
return;
|
||||
}
|
||||
if(chunk.addModule(d.module)) {
|
||||
d.module.addChunk(chunk);
|
||||
this.processDependenciesBlockForChunk(d.module, chunk);
|
||||
}
|
||||
if(typeof d.module.index2 !== "number") {
|
||||
d.module.index2 = this.nextFreeModuleIndex2++;
|
||||
queue.push([d.module, chunk]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -842,11 +902,14 @@ Compilation.prototype.sortItemsWithModuleIds = function sortItemsWithModuleIds()
|
|||
});
|
||||
};
|
||||
|
||||
Compilation.prototype.sortItemswithChunkIds = function sortItemswithChunkIds() {
|
||||
Compilation.prototype.sortItemsWithChunkIds = function sortItemsWithChunkIds() {
|
||||
this.chunks.sort(byId);
|
||||
this.modules.forEach(function(module) {
|
||||
module.sortItems();
|
||||
});
|
||||
this.chunks.forEach(function(chunk) {
|
||||
chunk.sortItems();
|
||||
});
|
||||
};
|
||||
|
||||
Compilation.prototype.summarizeDependencies = function summarizeDependencies() {
|
||||
|
|
@ -924,7 +987,7 @@ Compilation.prototype.createHash = function createHash() {
|
|||
} else {
|
||||
this.chunkTemplate.updateHashForChunk(chunkHash);
|
||||
}
|
||||
this.applyPlugins("chunk-hash", chunk, chunkHash);
|
||||
this.applyPlugins2("chunk-hash", chunk, chunkHash);
|
||||
chunk.hash = chunkHash.digest(hashDigest);
|
||||
hash.update(chunk.hash);
|
||||
chunk.renderedHash = chunk.hash.substr(0, hashDigestLength);
|
||||
|
|
@ -949,7 +1012,7 @@ Compilation.prototype.createModuleAssets = function createModuleAssets() {
|
|||
var cacheAssetsAndApplyPlugins = function cacheAssetsAndApplyPlugins(name) {
|
||||
var file = this.getPath(name);
|
||||
this.assets[file] = module.assets[name];
|
||||
this.applyPlugins("module-asset", module, file);
|
||||
this.applyPlugins2("module-asset", module, file);
|
||||
}
|
||||
|
||||
for(var i = 0; i < this.modules.length; i++) {
|
||||
|
|
@ -999,7 +1062,7 @@ Compilation.prototype.createChunkAssets = function createChunkAssets() {
|
|||
throw new Error("Conflict: Multiple assets emit to the same filename '" + file + "'");
|
||||
this.assets[file] = source;
|
||||
chunk.files.push(file);
|
||||
this.applyPlugins("chunk-asset", chunk, file);
|
||||
this.applyPlugins2("chunk-asset", chunk, file);
|
||||
} catch(err) {
|
||||
this.errors.push(new ChunkRenderError(chunk, file || filenameTemplate, err));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ function Compiler() {
|
|||
this.contextTimestamps = {};
|
||||
|
||||
this.resolvers = {
|
||||
normal: new Resolver(null),
|
||||
loader: new Resolver(null),
|
||||
context: new Resolver(null)
|
||||
normal: null,
|
||||
loader: null,
|
||||
context: null
|
||||
};
|
||||
var deprecationReported = false;
|
||||
this.parser = {
|
||||
|
|
|
|||
|
|
@ -15,53 +15,65 @@ FlagDependencyUsagePlugin.prototype.apply = function(compiler) {
|
|||
module.used = false;
|
||||
})
|
||||
|
||||
var queue = [];
|
||||
compilation.chunks.forEach(function(chunk) {
|
||||
if(chunk.entryModule) {
|
||||
processModule(chunk.entryModule, true);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
while(queue.length) {
|
||||
var queueItem = queue.pop();
|
||||
processDependenciesBlock(queueItem[0], queueItem[1]);
|
||||
}
|
||||
|
||||
function processModule(module, usedExports) {
|
||||
module.used = true;
|
||||
if(usedExports === true || module.usedExports === true)
|
||||
module.usedExports = true;
|
||||
else if(Array.isArray(usedExports))
|
||||
module.usedExports = addToSet(module.usedExports || [], usedExports)
|
||||
else if(Array.isArray(module.usedExports))
|
||||
module.usedExports = module.usedExports;
|
||||
else
|
||||
module.usedExports = false;
|
||||
function processModule(module, usedExports) {
|
||||
module.used = true;
|
||||
if(module.usedExports === true)
|
||||
return;
|
||||
else if(usedExports === true)
|
||||
module.usedExports = true;
|
||||
else if(Array.isArray(usedExports)) {
|
||||
var old = module.usedExports ? module.usedExports.length : -1;
|
||||
module.usedExports = addToSet(module.usedExports || [], usedExports);
|
||||
if(module.usedExports.length === old)
|
||||
return;
|
||||
}
|
||||
else if(Array.isArray(module.usedExports))
|
||||
return;
|
||||
else
|
||||
module.usedExports = false;
|
||||
|
||||
processDependenciesBlock(module, module.usedExports);
|
||||
}
|
||||
queue.push([module, module.usedExports]);
|
||||
}
|
||||
|
||||
function processDependenciesBlock(depBlock, usedExports) {
|
||||
depBlock.dependencies.forEach(function(dep) {
|
||||
processDependency(dep, usedExports);
|
||||
});
|
||||
depBlock.variables.forEach(function(variable) {
|
||||
variable.dependencies.forEach(function(dep) {
|
||||
function processDependenciesBlock(depBlock, usedExports) {
|
||||
depBlock.dependencies.forEach(function(dep) {
|
||||
processDependency(dep, usedExports);
|
||||
});
|
||||
});
|
||||
depBlock.blocks.forEach(function(block) {
|
||||
processDependenciesBlock(block, usedExports);
|
||||
});
|
||||
}
|
||||
|
||||
function processDependency(dep, usedExports) {
|
||||
var reference = dep.getReference && dep.getReference();
|
||||
if(!reference) return;
|
||||
var module = reference.module;
|
||||
var importedNames = reference.importedNames;
|
||||
var oldUsed = module.used;
|
||||
var oldUsedExports = module.usedExports;
|
||||
if(!oldUsed || (importedNames && (!oldUsedExports || !isSubset(oldUsedExports, importedNames)))) {
|
||||
processModule(module, importedNames);
|
||||
depBlock.variables.forEach(function(variable) {
|
||||
variable.dependencies.forEach(function(dep) {
|
||||
processDependency(dep, usedExports);
|
||||
});
|
||||
});
|
||||
depBlock.blocks.forEach(function(block) {
|
||||
queue.push([block, usedExports]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function processDependency(dep, usedExports) {
|
||||
var reference = dep.getReference && dep.getReference();
|
||||
if(!reference) return;
|
||||
var module = reference.module;
|
||||
var importedNames = reference.importedNames;
|
||||
var oldUsed = module.used;
|
||||
var oldUsedExports = module.usedExports;
|
||||
if(!oldUsed || (importedNames && (!oldUsedExports || !isSubset(oldUsedExports, importedNames)))) {
|
||||
processModule(module, importedNames);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function addToSet(a, b) {
|
||||
b.forEach(function(item) {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ function NormalModuleFactory(context, resolvers, options) {
|
|||
], function(err, results) {
|
||||
if(err) return callback(err);
|
||||
loaders = results[0].concat(loaders).concat(results[1]).concat(results[2]);
|
||||
onDoneResolving();
|
||||
process.nextTick(onDoneResolving);
|
||||
});
|
||||
|
||||
function onDoneResolving() {
|
||||
|
|
|
|||
|
|
@ -283,15 +283,16 @@ WebpackOptionsApply.prototype.process = function(options, compiler) {
|
|||
}
|
||||
|
||||
compiler.applyPlugins("after-plugins", compiler);
|
||||
if(!compiler.inputFileSystem) throw new Error("No input filesystem provided");
|
||||
compiler.resolvers.normal = ResolverFactory.createResolver(assign({
|
||||
resolver: compiler.resolvers.normal
|
||||
fileSystem: compiler.inputFileSystem
|
||||
}, options.resolve));
|
||||
compiler.resolvers.context = ResolverFactory.createResolver(assign({
|
||||
resolver: compiler.resolvers.context,
|
||||
fileSystem: compiler.inputFileSystem,
|
||||
resolveToContext: true
|
||||
}, options.resolve));
|
||||
compiler.resolvers.loader = ResolverFactory.createResolver(assign({
|
||||
resolver: compiler.resolvers.loader
|
||||
fileSystem: compiler.inputFileSystem
|
||||
}, options.resolveLoader));
|
||||
compiler.applyPlugins("after-resolvers", compiler);
|
||||
return options;
|
||||
|
|
|
|||
|
|
@ -118,18 +118,20 @@ AMDPlugin.prototype.apply = function(compiler) {
|
|||
setTypeof("require", "function");
|
||||
});
|
||||
});
|
||||
compiler.resolvers.normal.apply(
|
||||
new AliasPlugin("described-resolve", {
|
||||
name: "amdefine",
|
||||
alias: path.join(__dirname, "..", "..", "buildin", "amd-define.js")
|
||||
}, "resolve"),
|
||||
new AliasPlugin("described-resolve", {
|
||||
name: "webpack amd options",
|
||||
alias: path.join(__dirname, "..", "..", "buildin", "amd-options.js")
|
||||
}, "resolve"),
|
||||
new AliasPlugin("described-resolve", {
|
||||
name: "webpack amd define",
|
||||
alias: path.join(__dirname, "..", "..", "buildin", "amd-define.js")
|
||||
}, "resolve")
|
||||
);
|
||||
compiler.plugin("after-resolvers", function() {
|
||||
compiler.resolvers.normal.apply(
|
||||
new AliasPlugin("described-resolve", {
|
||||
name: "amdefine",
|
||||
alias: path.join(__dirname, "..", "..", "buildin", "amd-define.js")
|
||||
}, "resolve"),
|
||||
new AliasPlugin("described-resolve", {
|
||||
name: "webpack amd options",
|
||||
alias: path.join(__dirname, "..", "..", "buildin", "amd-options.js")
|
||||
}, "resolve"),
|
||||
new AliasPlugin("described-resolve", {
|
||||
name: "webpack amd define",
|
||||
alias: path.join(__dirname, "..", "..", "buildin", "amd-define.js")
|
||||
}, "resolve")
|
||||
);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,11 +10,8 @@ var CachedInputFileSystem = require("enhanced-resolve/lib/CachedInputFileSystem"
|
|||
function NodeEnvironmentPlugin() {}
|
||||
module.exports = NodeEnvironmentPlugin;
|
||||
NodeEnvironmentPlugin.prototype.apply = function(compiler) {
|
||||
compiler.inputFileSystem = new NodeJsInputFileSystem();
|
||||
var inputFileSystem = compiler.inputFileSystem = new CachedInputFileSystem(compiler.inputFileSystem, 60000);
|
||||
compiler.resolvers.normal.fileSystem = compiler.inputFileSystem;
|
||||
compiler.resolvers.context.fileSystem = compiler.inputFileSystem;
|
||||
compiler.resolvers.loader.fileSystem = compiler.inputFileSystem;
|
||||
compiler.inputFileSystem = new CachedInputFileSystem(new NodeJsInputFileSystem(), 60000);
|
||||
var inputFileSystem = compiler.inputFileSystem;
|
||||
compiler.outputFileSystem = new NodeOutputFileSystem();
|
||||
compiler.watchFileSystem = new NodeWatchFileSystem(compiler.inputFileSystem);
|
||||
compiler.plugin("before-run", function(compiler, callback) {
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ OccurrenceOrderPlugin.prototype.apply = function(compiler) {
|
|||
});
|
||||
// TODO refactor to Map
|
||||
modules.forEach(function(m) {
|
||||
delete m.__OccurenceOrderPlugin_occursInEntry;
|
||||
delete m.__OccurenceOrderPlugin_occurs;
|
||||
m.__OccurenceOrderPlugin_occursInEntry = undefined;
|
||||
m.__OccurenceOrderPlugin_occurs = undefined;
|
||||
});
|
||||
});
|
||||
compilation.plugin("optimize-chunk-order", function(chunks) {
|
||||
|
|
@ -104,7 +104,7 @@ OccurrenceOrderPlugin.prototype.apply = function(compiler) {
|
|||
});
|
||||
// TODO refactor to Map
|
||||
chunks.forEach(function(c) {
|
||||
delete c.__OccurenceOrderPlugin_occursInEntry;
|
||||
c.__OccurenceOrderPlugin_occursInEntry = undefined;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,8 +9,5 @@ function WebEnvironmentPlugin(inputFileSystem, outputFileSystem) {
|
|||
module.exports = WebEnvironmentPlugin;
|
||||
WebEnvironmentPlugin.prototype.apply = function(compiler) {
|
||||
var inputFileSystem = compiler.inputFileSystem = this.inputFileSystem;
|
||||
compiler.resolvers.normal.fileSystem = inputFileSystem;
|
||||
compiler.resolvers.context.fileSystem = inputFileSystem;
|
||||
compiler.resolvers.loader.fileSystem = inputFileSystem;
|
||||
compiler.outputFileSystem = this.outputFileSystem;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ function webpack(options, callback) {
|
|||
new WebpackOptionsDefaulter().process(options);
|
||||
|
||||
compiler = new Compiler();
|
||||
compiler.options = options;
|
||||
compiler.options = new WebpackOptionsApply().process(options, compiler);
|
||||
new NodeEnvironmentPlugin().apply(compiler);
|
||||
compiler.applyPlugins("environment");
|
||||
compiler.applyPlugins("after-environment");
|
||||
compiler.options = options;
|
||||
compiler.options = new WebpackOptionsApply().process(options, compiler);
|
||||
} else {
|
||||
throw new Error("Invalid argument: options");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,6 +471,9 @@
|
|||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"useSyncFileSystemCalls": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ describe("Compiler (caching)", function() {
|
|||
};
|
||||
|
||||
var c = new Compiler();
|
||||
c.options = new WebpackOptionsApply().process(options, c);
|
||||
new NodeEnvironmentPlugin().apply(c);
|
||||
c.options = new WebpackOptionsApply().process(options, c);
|
||||
var files = {};
|
||||
c.outputFileSystem = {
|
||||
join: path.join.bind(path),
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ describe("Compiler", function() {
|
|||
};
|
||||
|
||||
var c = new Compiler();
|
||||
c.options = new WebpackOptionsApply().process(options, c);
|
||||
new NodeEnvironmentPlugin().apply(c);
|
||||
c.options = new WebpackOptionsApply().process(options, c);
|
||||
var files = {};
|
||||
c.outputFileSystem = {
|
||||
join: path.join.bind(path),
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
Hash: 8e46421d7f7a7d266a00
|
||||
Hash: 94ea214f5f8dfcaa01e7
|
||||
Time: Xms
|
||||
Asset Size Chunks Chunk Names
|
||||
48c8b1dae03a37363ec8.js 4.24 kB 1 [emitted]
|
||||
2fa7af5012a3d8b778dd.js 2.22 kB 2 [emitted]
|
||||
a5b577236621262c2bcf.js 1.93 kB 3 [emitted]
|
||||
7ae90280671106fd3e86.js 2.22 kB 2 [emitted]
|
||||
9356e9a0fb00a97b2e73.js 1.93 kB 3 [emitted]
|
||||
88d78642a86768757078.js 977 bytes 4 [emitted]
|
||||
Entrypoint main = 48c8b1dae03a37363ec8.js a5b577236621262c2bcf.js 88d78642a86768757078.js 2fa7af5012a3d8b778dd.js
|
||||
Entrypoint main = 48c8b1dae03a37363ec8.js 9356e9a0fb00a97b2e73.js 88d78642a86768757078.js 7ae90280671106fd3e86.js
|
||||
chunk {1} 48c8b1dae03a37363ec8.js 1.8 kB [entry] [rendered]
|
||||
> aggressive-splitted main [4] (webpack)/test/statsCases/aggressive-splitting-entry/index.js
|
||||
[0] (webpack)/test/statsCases/aggressive-splitting-entry/b.js 899 bytes {1} [built]
|
||||
[1] (webpack)/test/statsCases/aggressive-splitting-entry/c.js 899 bytes {1} [built]
|
||||
chunk {2} 2fa7af5012a3d8b778dd.js 1.91 kB [initial] [rendered]
|
||||
chunk {2} 7ae90280671106fd3e86.js 1.91 kB [initial] [rendered]
|
||||
> aggressive-splitted main [4] (webpack)/test/statsCases/aggressive-splitting-entry/index.js
|
||||
[4] (webpack)/test/statsCases/aggressive-splitting-entry/index.js 112 bytes {2} [built]
|
||||
[6] (webpack)/test/statsCases/aggressive-splitting-entry/f.js 899 bytes {2} [built]
|
||||
[7] (webpack)/test/statsCases/aggressive-splitting-entry/g.js 899 bytes {2} [built]
|
||||
chunk {3} a5b577236621262c2bcf.js 1.8 kB [initial] [rendered] [recorded]
|
||||
chunk {3} 9356e9a0fb00a97b2e73.js 1.8 kB [initial] [rendered] [recorded]
|
||||
> aggressive-splitted main [4] (webpack)/test/statsCases/aggressive-splitting-entry/index.js
|
||||
[2] (webpack)/test/statsCases/aggressive-splitting-entry/d.js 899 bytes {3} [built]
|
||||
[5] (webpack)/test/statsCases/aggressive-splitting-entry/a.js 899 bytes {3} [built]
|
||||
|
|
|
|||
|
|
@ -1,49 +1,49 @@
|
|||
Hash: a562f01542f9b2e2ad89
|
||||
Hash: a724b9eabbc88a7196a7
|
||||
Time: Xms
|
||||
Asset Size Chunks Chunk Names
|
||||
7434ce273df5c166f742.js 1.93 kB 0 [emitted]
|
||||
11324f155de813ceb658.js 1.95 kB 1 [emitted]
|
||||
5ae9e18455b866684bd0.js 1.94 kB 2 [emitted]
|
||||
e91ec4902ca3057b42bb.js 1.93 kB 3 [emitted]
|
||||
0947f0875d56ab0bfe02.js 977 bytes 4 [emitted]
|
||||
6335d9dcc7fa048743b7.js 7.2 kB 6 [emitted] main
|
||||
cf500be0e585f01d2ccb.js 983 bytes 9 [emitted]
|
||||
a7bfb642a544b4302cc4.js 975 bytes 11 [emitted]
|
||||
Entrypoint main = 6335d9dcc7fa048743b7.js
|
||||
chunk {0} 7434ce273df5c166f742.js 1.8 kB {6} [recorded]
|
||||
fc930a2adf8206ea2dc5.js 1.93 kB 0 [emitted]
|
||||
cd45585186d59208602b.js 1.95 kB 1 [emitted]
|
||||
6b94c231e016c5aaccdb.js 1.94 kB 2 [emitted]
|
||||
fd0985cee894c4f3f1a6.js 1.93 kB 3 [emitted]
|
||||
d9fc46873c8ea924b895.js 977 bytes 4 [emitted]
|
||||
90b55464dc36b9c472a9.js 7.2 kB 6 [emitted] main
|
||||
b08c507d4e1e05cbab45.js 983 bytes 9 [emitted]
|
||||
5d50e858fe6e559aa47c.js 975 bytes 11 [emitted]
|
||||
Entrypoint main = 90b55464dc36b9c472a9.js
|
||||
chunk {0} fc930a2adf8206ea2dc5.js 1.8 kB {6}
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 4:0-51
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 5:0-44
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 6:0-72
|
||||
[5] (webpack)/test/statsCases/aggressive-splitting-on-demand/f.js 899 bytes {0} [built]
|
||||
[6] (webpack)/test/statsCases/aggressive-splitting-on-demand/g.js 901 bytes {0} [built]
|
||||
chunk {1} 11324f155de813ceb658.js 1.8 kB {6}
|
||||
chunk {1} cd45585186d59208602b.js 1.8 kB {6} [recorded]
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 3:0-30
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 5:0-44
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 6:0-72
|
||||
[3] (webpack)/test/statsCases/aggressive-splitting-on-demand/d.js 899 bytes {1} [built]
|
||||
[4] (webpack)/test/statsCases/aggressive-splitting-on-demand/e.js 899 bytes {1} [built]
|
||||
chunk {2} 5ae9e18455b866684bd0.js 1.8 kB {6} [recorded]
|
||||
chunk {2} 6b94c231e016c5aaccdb.js 1.8 kB {6}
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 4:0-51
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 6:0-72
|
||||
[10] (webpack)/test/statsCases/aggressive-splitting-on-demand/j.js 901 bytes {2} [built]
|
||||
[11] (webpack)/test/statsCases/aggressive-splitting-on-demand/k.js 899 bytes {2} [built]
|
||||
chunk {3} e91ec4902ca3057b42bb.js 1.8 kB {6}
|
||||
chunk {3} fd0985cee894c4f3f1a6.js 1.8 kB {6} [recorded]
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 4:0-51
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 6:0-72
|
||||
[7] (webpack)/test/statsCases/aggressive-splitting-on-demand/h.js 899 bytes {3} [built]
|
||||
[8] (webpack)/test/statsCases/aggressive-splitting-on-demand/i.js 899 bytes {3} [built]
|
||||
chunk {4} 0947f0875d56ab0bfe02.js 899 bytes {6} [rendered]
|
||||
chunk {4} d9fc46873c8ea924b895.js 899 bytes {6}
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 2:0-23
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 3:0-30
|
||||
[2] (webpack)/test/statsCases/aggressive-splitting-on-demand/c.js 899 bytes {4} [built]
|
||||
chunk {6} 6335d9dcc7fa048743b7.js (main) 248 bytes [entry] [rendered]
|
||||
chunk {6} 90b55464dc36b9c472a9.js (main) 248 bytes [entry]
|
||||
> main [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js
|
||||
[9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 248 bytes {6} [built]
|
||||
chunk {9} cf500be0e585f01d2ccb.js 899 bytes {6}
|
||||
chunk {9} b08c507d4e1e05cbab45.js 899 bytes {6}
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 2:0-23
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 5:0-44
|
||||
> aggressive-splitted duplicate [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 6:0-72
|
||||
[1] (webpack)/test/statsCases/aggressive-splitting-on-demand/b.js 899 bytes {9} [built]
|
||||
chunk {11} a7bfb642a544b4302cc4.js 899 bytes {6}
|
||||
chunk {11} 5d50e858fe6e559aa47c.js 899 bytes {6}
|
||||
> [9] (webpack)/test/statsCases/aggressive-splitting-on-demand/index.js 1:0-16
|
||||
[0] (webpack)/test/statsCases/aggressive-splitting-on-demand/a.js 899 bytes {11} [built]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
Hash: 5957a4911072fb217ca1
|
||||
Hash: 2f2e1a6509026c675e46
|
||||
Time: Xms
|
||||
Asset Size Chunks Chunk Names
|
||||
main.js 2.64 kB 0 [emitted] main
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Hash: 2c7426d5dd5764a5cfe8
|
||||
Hash: 98677d85dd05d16cbe7f
|
||||
Time: Xms
|
||||
Asset Size Chunks Chunk Names
|
||||
0.js 220 bytes 0 [emitted] cir1
|
||||
|
|
@ -9,7 +9,7 @@ Time: Xms
|
|||
5.js 293 bytes 5, 3 [emitted] cir2 from cir1
|
||||
6.js 78 bytes 6 [emitted] ac in ab
|
||||
main.js 6.45 kB 7 [emitted] main
|
||||
chunk {0} 0.js (cir1) 81 bytes {7} {5} {3} [rendered]
|
||||
chunk {0} 0.js (cir1) 81 bytes {3} {5} {7} [rendered]
|
||||
> duplicate cir1 from cir2 [3] (webpack)/test/statsCases/optimize-chunks/circular2.js 1:0-79
|
||||
> duplicate cir1 [8] (webpack)/test/statsCases/optimize-chunks/index.js 13:0-54
|
||||
[2] (webpack)/test/statsCases/optimize-chunks/circular1.js 81 bytes {0} [built]
|
||||
|
|
@ -25,7 +25,7 @@ chunk {2} 2.js (ab) 0 bytes {7} [rendered]
|
|||
chunk {3} 3.js (cir2) 81 bytes {7} [rendered]
|
||||
> cir2 [8] (webpack)/test/statsCases/optimize-chunks/index.js 14:0-54
|
||||
[3] (webpack)/test/statsCases/optimize-chunks/circular2.js 81 bytes {3} {5} [built]
|
||||
chunk {4} 4.js (chunk) 0 bytes {6} {1} [rendered]
|
||||
chunk {4} 4.js (chunk) 0 bytes {1} {6} [rendered]
|
||||
> chunk [8] (webpack)/test/statsCases/optimize-chunks/index.js 3:2-4:13
|
||||
> chunk [8] (webpack)/test/statsCases/optimize-chunks/index.js 9:1-10:12
|
||||
[4] (webpack)/test/statsCases/optimize-chunks/modules/c.js 0 bytes {4} {6} [built]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Hash: 37c14a3d270eb3a66a74
|
||||
Hash: e94a2c6bee98efb02ae8
|
||||
Time: Xms
|
||||
Asset Size Chunks Chunk Names
|
||||
bundle.js 7.14 kB 0 [emitted] main
|
||||
|
|
|
|||
Loading…
Reference in New Issue