Skip to content

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

+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)