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

Commit

Permalink
removed dead code, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Jun 19, 2017
1 parent d8943d7 commit e2631af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ var OrderUndefinedError = require("./OrderUndefinedError");
var loaderUtils = require("loader-utils");
var validateOptions = require('schema-utils');
var path = require('path');
var OriginalSource = require("webpack-sources").OriginalSource;

var NS = fs.realpathSync(__dirname);

Expand Down Expand Up @@ -277,7 +276,6 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
if(meta && (!meta.options.id || meta.options.id === id)) {
var wasExtracted = Array.isArray(meta.content);
if(shouldExtract !== wasExtracted) {
// don't remove
var newModule = new NormalModule(
module.request,
module.userRequest,
Expand All @@ -287,6 +285,7 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
module.parser
);
newModule[NS + "/extract"] = shouldExtract; // eslint-disable-line no-path-concat
// build a new module and save result to extracted compilations
compilation.buildModule(newModule, false, newModule, null, function(err) {
if(err) {
compilation.errors.push(err);
Expand Down Expand Up @@ -360,7 +359,7 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
newModule._source = data.module._source;
data.chunks.forEach(function (chunk) {
chunk.removeModule(data.moduleToRemove);
var deps = data.moduleToRemove.dependencies.slice();
var deps = data.moduleToRemove.dependencies;
deps.forEach(d => {
chunk.removeModule(d.module);
});
Expand Down

0 comments on commit e2631af

Please sign in to comment.