Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: extractCSS, Webpack 4, extract-text-webpack-plugin and mini-css-extract-plugin #1196

Closed
darylteo opened this issue Mar 20, 2018 · 6 comments

Comments

@darylteo
Copy link

What problem does this feature solve?

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 webpack-contrib/extract-text-webpack-plugin#749

What does the proposed API look like?

Don't have any recommendations here... except maybe have extractCSS take a loader.

@yyx990803
Copy link
Member

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.

@darylteo
Copy link
Author

Great news. Thanks very much for your work @yyx990803

@luisatmaniak
Copy link

@yyx990803 How will this change impact SSR/critical CSS extraction?

@yyx990803
Copy link
Member

@luisatmaniak no change.

@cartok
Copy link

cartok commented Oct 28, 2020

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.

@cartok
Copy link

cartok commented Oct 28, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants