mirror of https://github.com/webpack/webpack.git
rename async to make it future proof
This commit is contained in:
parent
e6d39c0669
commit
db0dbc327b
|
@ -9,8 +9,8 @@ try {
|
||||||
|
|
||||||
function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
|
function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
|
||||||
var source = [];
|
var source = [];
|
||||||
var async = depth >= asyncDepth;
|
var isAsync = depth >= asyncDepth;
|
||||||
if(!async)
|
if(!isAsync)
|
||||||
circular.push(path.resolve(fixtures, prefix + "/index.js"));
|
circular.push(path.resolve(fixtures, prefix + "/index.js"));
|
||||||
source.push("(function() {");
|
source.push("(function() {");
|
||||||
var m = (r % multiplex) + 1;
|
var m = (r % multiplex) + 1;
|
||||||
|
@ -23,7 +23,7 @@ function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
|
||||||
sum += genModule(prefix + "/" + i, depth - 1, asyncDepth, multiplex, (r + i + depth) * m + i + depth, circular);
|
sum += genModule(prefix + "/" + i, depth - 1, asyncDepth, multiplex, (r + i + depth) * m + i + depth, circular);
|
||||||
source.push("require(" + JSON.stringify("./" + i) + ");");
|
source.push("require(" + JSON.stringify("./" + i) + ");");
|
||||||
if(i === 0) {
|
if(i === 0) {
|
||||||
if(async)
|
if(isAsync)
|
||||||
source.push("}); require.ensure([], function() {");
|
source.push("}); require.ensure([], function() {");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue