This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 513
Make extract-text-webpack-plugin re-entrant #17
Comments
Try this: At this line add something like: childCompiler.plugin("this-compilation", function(compilation) {
childCompiler.plugin("normal-module-loader", function(loaderContext, module) {
loaderContext[__dirname] = false;
});
}); and at this line add something like: if(this[__dirname] === false) {
return "";
} else So it generate an empty module for nested appliance of the extract-text-plugin loader. |
andreypopp
added a commit
to andreypopp/extract-text-webpack-plugin
that referenced
this issue
Sep 15, 2014
This disallows spawning child compilers from a child compiler. Fixes webpack-contrib#17.
Merged
@sokra thank you, this works, I initially fixed it by checking for |
The check |
@sokra added |
Would be nice to have a release of the plugin after this PR is merged! |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm working on React Style (see experimental branch and also #8 is slightly related as I iterated form your suggestion).
TL;DR: it produces CSS from JS:
Becomes:
.
The problem arises when I use both
css-loader
andreact-style-loader
withextract-text-webpack-plugin
(I need to combine both approaches b/c some legacy styles I still want to import via CSS modules, like bootstrap for example).Because plugin compiles mini-bundle which includes all JS code (due to
react-style-loader
) it encounters css requires once more but b/c child compiler has noextract-text-webpack-plugin
configured for itself but inherits all loaders from main compiler it fails. But more importantly I don't want to process CSS files during react style bundle compilation b/c such CSS files will be processed by another child compiler (a direct child of main compiler).So my question is how to make/configure
extract-text-webpack-plugin
re-entrant so child compilers don't produce another child compilers.The text was updated successfully, but these errors were encountered: