mirror of https://github.com/webpack/webpack.git
beautify
This commit is contained in:
parent
f4ab7fc7e2
commit
2817c3629d
|
|
@ -673,6 +673,7 @@ Compilation.prototype.addChunk = function addChunk(name, module, loc) {
|
|||
|
||||
Compilation.prototype.assignIndex = function assignIndex(module) {
|
||||
var _this = this;
|
||||
|
||||
function assignIndexToModule(module) {
|
||||
// enter module
|
||||
if(typeof module.index !== "number") {
|
||||
|
|
@ -687,6 +688,7 @@ Compilation.prototype.assignIndex = function assignIndex(module) {
|
|||
assignIndexToDependencyBlock(module);
|
||||
}
|
||||
}
|
||||
|
||||
function assignIndexToDependency(dependency) {
|
||||
if(dependency.module) {
|
||||
queue.push(function() {
|
||||
|
|
@ -694,12 +696,14 @@ Compilation.prototype.assignIndex = function assignIndex(module) {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
function assignIndexToDependencyBlock(block) {
|
||||
var allDependencies = [];
|
||||
|
||||
function iteratorDependency(d) {
|
||||
allDependencies.push(d);
|
||||
}
|
||||
|
||||
function iteratorBlock(b) {
|
||||
queue.push(function() {
|
||||
assignIndexToDependencyBlock(b);
|
||||
|
|
@ -735,7 +739,9 @@ Compilation.prototype.assignIndex = function assignIndex(module) {
|
|||
};
|
||||
|
||||
Compilation.prototype.processDependenciesBlockForChunk = function processDependenciesBlockForChunk(block, chunk) {
|
||||
var queue = [[block, chunk]];
|
||||
var queue = [
|
||||
[block, chunk]
|
||||
];
|
||||
while(queue.length) {
|
||||
var queueItem = queue.pop();
|
||||
block = queueItem[0];
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ FlagDependencyUsagePlugin.prototype.apply = function(compiler) {
|
|||
module.usedExports = addToSet(module.usedExports || [], usedExports);
|
||||
if(module.usedExports.length === old)
|
||||
return;
|
||||
}
|
||||
else if(Array.isArray(module.usedExports))
|
||||
} else if(Array.isArray(module.usedExports))
|
||||
return;
|
||||
else
|
||||
module.usedExports = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue