-
Notifications
You must be signed in to change notification settings - Fork 13
Support loaders with object based config #10
Comments
Hey @james-s-turner, we're working on the same thing! I have an example repo. I got But the issue is it's not creating the files, maybe In your example above you can do: {
test: /\.scss$/,
loader: multi(
combineLoaders(ExtractTextPlugin.extract( ... )),
combineLoaders(ExtractTextPlugin.extract( ... ))
)
} |
Hello @albertstill - good to know it's not just me! Thanks for the tip. Yes I thought I had it cracked too when I got it running without errors, only to have my hopes cruelly dashed when I realised there was no output. |
Hi Again @albertstill - check out updates on the issue about the future of ETWP. ETWP will not support Webpack4 and is being put in "maintenance" mode. Judging by the lack of response on this issue, my EWTP issue and that the maintainers will focus on Webpack4 plugins I think it unlikely this issue will be fixed on webpack3 plugins/loaders. |
nice work mate, will do! |
Also for the interim at my company I'm just creating multiple Webpack configs each with their own theme, |
The bug is in
When this happens,
However, this reveals another bug. The documentation says that the The code also reveals this to be a valid option: https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/src/index.js#L32 However, the schema, that is used to validate the options, makes no mention of this field. So when specified, the schema validator complains it's not a valid option. If you manually patch the schema to accept https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/schema/plugin.json I've submitted a PR here: webpack-contrib/extract-text-webpack-plugin#774 Feel free to use my fork in the mean time :) FYI: Combing this fork of |
Uh oh!
There was an error while loading. Please reload this page.
Currently multi-loader only supports string based (sub) loaders e.g.
However the following fails:
with the error:
Module not found: Error: Can't resolve '[object Object]'
As mentioned: this particular example can be fixed using webpack-combine-loaders. However like @delsvr I'm trying to use ExtractTextPlugin to generate stylesheets for multiple themes
This fails because combineLoaders cant transform the returned config into a query string.
This is a complete showstopper for me at the moment trying to create multiple themes.
If the multi-loader is not amenable to a solution is there any other way to achieve the desired result?
The text was updated successfully, but these errors were encountered: