Skip to content

Commit 261df23

Browse files
authored
Merge pull request #402 from webpack-contrib/remove-remove-and-do-dependency
inline removeAndDo dep to webpack internal lib
2 parents 6d42658 + a768464 commit 261df23

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ExtractedModule.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ ExtractedModule.prototype.addChunk = function(chunk) {
2727
this.chunks.push(chunk);
2828
};
2929

30-
ExtractedModule.prototype._removeAndDo = require("webpack/lib/removeAndDo");
31-
3230
ExtractedModule.prototype.removeChunk = function(chunk) {
33-
return this._removeAndDo("chunks", chunk, "removeModule");
31+
var idx = this.chunks.indexOf(chunk);
32+
if(idx >= 0) {
33+
this.chunks.splice(idx, 1);
34+
chunk.removeModule(this);
35+
return true;
36+
}
37+
return false;
3438
};
3539

3640
ExtractedModule.prototype.rewriteChunkInReasons = function(oldChunk, newChunks) { };

0 commit comments

Comments
 (0)