Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit a768464

Browse files
committed
inline removeAndDo dep to webpack internal lib
this will be removed from webpack and should arguably never been used in the first place
1 parent e831507 commit a768464

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ExtractedModule.js

Lines changed: 7 additions & 3 deletions
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)