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

Commit

Permalink
inline removeAndDo dep to webpack internal lib
Browse files Browse the repository at this point in the history
this will be removed from webpack and should arguably never been used in the first place
  • Loading branch information
timse committed Feb 13, 2017
1 parent e831507 commit a768464
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ExtractedModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ ExtractedModule.prototype.addChunk = function(chunk) {
this.chunks.push(chunk);
};

ExtractedModule.prototype._removeAndDo = require("webpack/lib/removeAndDo");

ExtractedModule.prototype.removeChunk = function(chunk) {
return this._removeAndDo("chunks", chunk, "removeModule");
var idx = this.chunks.indexOf(chunk);
if(idx >= 0) {
this.chunks.splice(idx, 1);
chunk.removeModule(this);
return true;
}
return false;
};

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

0 comments on commit a768464

Please sign in to comment.