Skip to content

Commit 686756c

Browse files
committed
fixed removing of parent modules
1 parent d1ea524 commit 686756c

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎lib/buildDeps.js‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,16 @@ function removeParentsModules(depTree, chunk) {
458458
var inParent = true;
459459
var checkedParents = {};
460460
chunk.parents.forEach(function checkParent(parentId) {
461+
if(!inParent) return;
461462
if(checkedParents[parentId]) return;
462463
checkedParents[parentId] = true;
463-
if(!depTree.chunks[parentId].modules[moduleId])
464-
inParent = false;
465-
if(inParent && depTree.chunks[parentId].parents)
466-
depTree.chunks[parentId].parents.forEach(checkParent);
464+
if(!depTree.chunks[parentId].modules[moduleId]) {
465+
var parents = depTree.chunks[parentId].parents;
466+
if(parents && parents.length > 0)
467+
parents.forEach(checkParent);
468+
else
469+
inParent = false;
470+
}
467471
});
468472
if(inParent) {
469473
chunk.modules[moduleId] = "in-parent";

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpack",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"author": "Tobias Koppers @sokra",
55
"description": "Packs CommonJs Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loading of js, json, jade, coffee, css, ... out of the box and more with custom loaders.",
66
"dependencies": {

0 commit comments

Comments
 (0)