Nuxt by default outputs CSS loaded through the css entrypoint in nuxt.config on all pages. This is to help the page load faster by not having to make another over the wire call. However, I'm running into some major issues with the document size now.
I'm using Bulma with Buefy and some other custom css. Using the build analyzer, I can see that the gzipped size is 38kb for the entire generated css. However, because this is embedded into the html and the html is not gzipped, the size is expanded out to 375kb.
I wish
linked styles. I understand this can lead to FOC but might be something I'm willing to do to avoid the large document delivery.If someone has experience using Bulma/Buefy with Nuxt and have better optimized their load times. Please chime in and help!
@uptownhr you might try:
nuxt.config.js
build:{
extractCSS:true
}
Will try thanks!
As far as I remember there was gzip feature in Nuxt, but it was removed since it's better to do with web server or hosting provider.
@iamdubx
Actually gzip is not removed, just disabled in dev mode. 馃樃
In production mode, it's still enabled and can be configured by render.gzip in nuxt.config.js.
https://nuxtjs.org/api/configuration-render#gzip
Got it. It was removed from generate option, if I am not mistaken.
thanks everyone!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@uptownhr you might try: