-
Notifications
You must be signed in to change notification settings - Fork 103
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
Treeshaking fails at CSS #342
Comments
You are in Development mode? Try it in production => optimized build. |
No, this is after running |
OK strange... |
Here is the coverage of the default app created from the quickstart, running after To be clear, this appears to suggest that every project using this module ships 283kB of CSS to the browser, of which over 90% is unused for most applications. |
when I set |
does it occurred when use vuetify only with vue? |
Having the same issue. I use SSG and I get FOUC probably because of the time it takes to load the entire css of vuetify instead of very little that is actually used. any way around it? |
Interested and following. I'd love to include some of vuetify plugins and optimize everything |
Same here, just made a fresh project, cleaned out all the default stuff inside index.vue so nothing of Vuetify should be loaded, did a build and it serves a 314KiB css file with all the Vuetify css in it. Vuetify related stuff inside my nuxtjs.config.js,
You would expect a small css bundle size but it's huge instead. Anyone who has a solution for this? |
I ran to the same issue too. Only use one VDatePicker component however the building includes the whole |
|
See also #382 |
Not sure if we have any potential fix for this. |
Module version
1.11.0
Describe the bug
Even with treeshaking enabled, Vuetify includes a large amount of unneeded CSS when the nuxt project is built.
To Reproduce
Build any nuxt-vuetify project, open Chrome devtools, go to Sources, open Coverage tab, observe how much CSS (and JS) is unused.
By default this is included in vendors.js as main.sass, but setting
extractCSS: true
in webpack config pulls out the CSS into a separate file, where the inefficiency can be clearly viewed. I have included a pic of one of my projects in the screenshots section below. The CSS which is inlined in HTML files also has plenty of waste.This occurs for the quickstart create-nuxt-app default page, and the default code sandbox https://codesandbox.io/s/nuxtjs-vuetify-v0k7i.
Expected behavior
Would like only the necessary CSS to be shipped to the browser.
Screenshots
![image](https://user-images.githubusercontent.com/6606828/84172364-d7667b00-aa73-11ea-8418-2d780d4602ec.png)
The text was updated successfully, but these errors were encountered: