mirror of https://github.com/webpack/webpack.git
parent
2eed5961b0
commit
1a10838a61
|
|
@ -367,7 +367,9 @@ var hotInitCode = Template.getFunctionContent(function() {
|
||||||
return;
|
return;
|
||||||
hotRequestedFilesMap[chunkId] = false;
|
hotRequestedFilesMap[chunkId] = false;
|
||||||
for(var moduleId in moreModules) {
|
for(var moduleId in moreModules) {
|
||||||
hotUpdate[moduleId] = moreModules[moduleId];
|
if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
||||||
|
hotUpdate[moduleId] = moreModules[moduleId];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
|
if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
|
||||||
hotUpdateDownloaded();
|
hotUpdateDownloaded();
|
||||||
|
|
@ -394,7 +396,9 @@ var hotInitCode = Template.getFunctionContent(function() {
|
||||||
} else {
|
} else {
|
||||||
var outdatedModules = [];
|
var outdatedModules = [];
|
||||||
for(var id in hotUpdate) {
|
for(var id in hotUpdate) {
|
||||||
outdatedModules.push(+id);
|
if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
|
||||||
|
outdatedModules.push(+id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
callback(null, outdatedModules);
|
callback(null, outdatedModules);
|
||||||
}
|
}
|
||||||
|
|
@ -463,25 +467,27 @@ var hotInitCode = Template.getFunctionContent(function() {
|
||||||
var outdatedModules = [];
|
var outdatedModules = [];
|
||||||
var appliedUpdate = {};
|
var appliedUpdate = {};
|
||||||
for(var id in hotUpdate) {
|
for(var id in hotUpdate) {
|
||||||
var moduleId = +id;
|
if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
|
||||||
var result = getAffectedStuff(moduleId);
|
var moduleId = +id;
|
||||||
if(!result) {
|
var result = getAffectedStuff(moduleId);
|
||||||
if(options.ignoreUnaccepted)
|
if(!result) {
|
||||||
continue;
|
if(options.ignoreUnaccepted)
|
||||||
hotSetStatus("abort");
|
continue;
|
||||||
return callback(new Error("Aborted because " + moduleId + " is not accepted"));
|
hotSetStatus("abort");
|
||||||
}
|
return callback(new Error("Aborted because " + moduleId + " is not accepted"));
|
||||||
if(result instanceof Error) {
|
}
|
||||||
hotSetStatus("abort");
|
if(result instanceof Error) {
|
||||||
return callback(result);
|
hotSetStatus("abort");
|
||||||
}
|
return callback(result);
|
||||||
appliedUpdate[moduleId] = hotUpdate[moduleId];
|
}
|
||||||
addAllToSet(outdatedModules, result[0]);
|
appliedUpdate[moduleId] = hotUpdate[moduleId];
|
||||||
for(var moduleId in result[1]) {
|
addAllToSet(outdatedModules, result[0]);
|
||||||
if(Object.prototype.hasOwnProperty.call(result[1], moduleId)) {
|
for(var moduleId in result[1]) {
|
||||||
if(!outdatedDependencies[moduleId])
|
if(Object.prototype.hasOwnProperty.call(result[1], moduleId)) {
|
||||||
outdatedDependencies[moduleId] = [];
|
if(!outdatedDependencies[moduleId])
|
||||||
addAllToSet(outdatedDependencies[moduleId], result[1][moduleId]);
|
outdatedDependencies[moduleId] = [];
|
||||||
|
addAllToSet(outdatedDependencies[moduleId], result[1][moduleId]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue