Purgecss breaks with nuxt and vuetify
See original GitHub issueI followed the instructions on setting up purgecss with nuxt and added it to simple vuetify nuxt project.
https://github.com/husayt/nuxt-vuetify-purgecss
As you can see with npm run build
and npm run start
layout just breaks apart.
Vuetify is the most popular material ui framework for vue and it would be great to get purgecss working with it
Issue Analytics
- State:
- Created 6 years ago
- Comments:38 (5 by maintainers)
Top Results From Across the Web
vue.js - Nuxtjs + Vuetify + Purgecss - Stack Overflow
I can't seem to get purgecss to remove the icons though (which is the most important to me). I installed "@nuxtjs/vuetify": "^1.11.3", I ......
Read more >[Solved]-How to enable PurgeCSS for 3rd-part CSS-Vue.js
I fixed it by using nuxt-purgecss. nuxt.config.js module.exports = { buildModules: [ 'nuxt-purgecss' ] }. DengSihan 1244. Source: stackoverflow.com ...
Read more >Vue and Nuxt Performance Optimization Checklist
Read the comprehensive and in-depth technical article summarizing how to improve the site performance with efficient use of Vue.js and Nuxt.
Read more >Optimizing CSS with PurgeCSS | Warren Lee
I think one thing you can try is to reduce the amount of unused CSS when you're using a type of Vue/CSS framework...
Read more >CSS Reset — Vuetify
Vuetify is a Material Design component framework for Vue.js. It aims to provide all the tools necessary to create beautiful content rich ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I managed to remove a lot of unused CSS in my Nuxt + Vuetify + Tailwind app. It took me a while to figure out but I ended adding these options to my purgeCSS configuration which matched my requirements pretty nicely.
I basically wanted to get rid of all
v-application--is-rtl
classes plus all vuetify utility classes and use tailwinds. My CSS is now ~83kb rather than ~245kb. You could also whitelist justtheme--light
if you would like to remove the dark theme styles.I did also disable
$color-pack
. https://vuetifyjs.com/en/styles/colors/#sass-color-pack@patrickxchong Thx! I ended up with the same result as in my example. So it works 😆
I will leave this for posterity.
My App:
nuxt-purgecss
= parsed All (890.96 KB), gzipped All (208.99 KB)2. Only buildModules: nuxt-purgecss (without extractCSS and @fullhuman/postcss-purgecss)
3. buildModules + extractCSS (without @fullhuman/postcss-purgecss)
parsed All (532.1 KB), gzipped All (162.71 KB)
4. buildModules + extractCSS + @fullhuman/postcss-purgecss
parsed All (532.1 KB), gzipped All (162.71 KB)