There is currently a bit of uncertainty regarding the future of extract-text-webpack-plugin and sokraj's mini-css-extract-plugin. Unfortunately despite this plugin being one of the most commonly recommended plugins for Webpack, the transition for this plugin hasn't been handled very well (no blame being placed on anyone, that's just how things are). However, in the context of vue-loader, the extractCSS property is a hard dependency on extract-text-webpack-plugin, and I did not see any discussion regarding how this is going to be handled in the future so I'd recommend having this discussion sooner rather than later.
For some additional context, there is an existing discussion https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/749
Don't have any recommendations here... except maybe have extractCSS take a loader.
In v15 we will simply deprecate extractCSS since the configuration will be done in normal webpack config instead of in vue-loader's own options. It will work with both WETP and the new MCEP (in fact it's already tested here).
For v14, we'll likely have to keep it as-is.
Great news. Thanks very much for your work @yyx990803
@yyx990803 How will this change impact SSR/critical CSS extraction?
@luisatmaniak no change.
Hey @yyx990803 to me it looked like with the old CSS Extraction we would be able to choose which components we want to extract CSS from by matching component names in the loader settings. I think the that option is gone now or at least deprecated. I'm not sure if thats a good change. Please correct me if I'm wrong.
Hey @yyx990803 to me it looked like with the old CSS Extraction we would be able to choose which components we want to extract CSS from by matching component names in the loader settings. I think the that option is gone now or at least deprecated. I'm not sure if thats a good change. Please correct me if I'm wrong.
Found a soltuion, it can be done using the issuer option in the rule. (if you want to do it manually)
Most helpful comment
In v15 we will simply deprecate
extractCSSsince the configuration will be done in normal webpack config instead of invue-loader's own options. It will work with both WETP and the new MCEP (in fact it's already tested here).For v14, we'll likely have to keep it as-is.