webpack-configurator icon indicating copy to clipboard operation
webpack-configurator copied to clipboard

Plugin syntax doesn't work with when using `ExtractTextPlugin` with multiple instances.

Open vjpr opened this issue 9 years ago • 3 comments

See https://github.com/webpack/extract-text-webpack-plugin

There is also an extract function on the instance. You should use this if you have more than one ExtractTextPlugin.

There is no way to get access to the plugin instance until after config.resolve().

vjpr avatar Nov 26 '15 17:11 vjpr

I believe the docs show how the extract function can be used in the loader section?

lewie9021 avatar Nov 26 '15 18:11 lewie9021

It doesn't work when you have multiple instances of the extract text plugin. E.g. you want to extract different styles into different output files. You would need to be able to write config.plugin(extractTextPluginInstance) or something similar.

vjpr avatar Nov 26 '15 18:11 vjpr

I'd suggest using the merge method as a workaround for something like this. I need to think about what the best approach is for something like this. I'm not 100% happy with the plugin interface. It feels clunky. I've not had the need for multiple instances of ExtractTextPlugin yet.

lewie9021 avatar Nov 26 '15 21:11 lewie9021