Skip to content

Commit

Permalink
Merge pull request #3 from webpack-contrib/feature/webpack3
Browse files Browse the repository at this point in the history
Feature/webpack3
  • Loading branch information
MirrorBytes authored Jun 13, 2017
2 parents 037bfb6 + 92e4349 commit 04c8ae8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,12 @@ module.exports.pitch = function(request) {
filename: childFilename,
publicPath: publicPath
};
var childCompiler = this._compilation.createChildCompiler("extract-text-webpack-plugin", outputOptions);
var childCompiler = this._compilation.createChildCompiler("extract-text-webpack-plugin " + NS + " " + request, outputOptions);
childCompiler.apply(new NodeTemplatePlugin(outputOptions));
childCompiler.apply(new LibraryTemplatePlugin(null, "commonjs2"));
childCompiler.apply(new NodeTargetPlugin());
childCompiler.apply(new SingleEntryPlugin(this.context, "!!" + request));
childCompiler.apply(new LimitChunkCountPlugin({ maxChunks: 1 }));
var subCache = "subcache " + NS + " " + request; // eslint-disable-line no-path-concat
childCompiler.plugin("compilation", function(compilation) {
if(compilation.cache) {
if(!compilation.cache[subCache])
compilation.cache[subCache] = {};
compilation.cache = compilation.cache[subCache];
}
});
// We set loaderContext[NS] = false to indicate we already in
// a child compiler so we don't spawn another child compilers from there.
childCompiler.plugin("this-compilation", function(compilation) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"OrderUndefinedError.js"
],
"peerDependencies": {
"webpack": "^2.2.0"
"webpack": ">= 3.0.0-rc.0 || ^3.0.0"
},
"dependencies": {
"schema-utils": "^0.3.0",
Expand All @@ -35,7 +35,7 @@
"should": "^11.1.2",
"standard-version": "^4.1.0",
"style-loader": "^0.18.2",
"webpack": "^2.6.1"
"webpack": "^3.0.0-rc.0"
},
"homepage": "http://github.com/webpack-contrib/extract-text-webpack-plugin",
"repository": {
Expand Down

0 comments on commit 04c8ae8

Please sign in to comment.