Asset compression support with `nuxi generate`
See original GitHub issueNitro 0.5.x added new option to enable assets pre-compression (https://github.com/unjs/nitro/pull/449) and can be enabled using this:
import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
nitro: {
compressPublicAssets: true,
},
})
Currently, it only works with nuxi build
that runs the public assets plugin but nuxi generate
seems not working (thanks @fedeweb for pointing it out!)
Issue Analytics
- State:
- Created a year ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
NuxtJS Static Assets Compression with nuxt-compress
Run your build script (e.g. npm run generate ) and your files will be automatically compressed. Check your built .js files (mine is...
Read more >The build Property - Nuxt
Nuxt lets you customize the webpack configuration for building your web application as you want.
Read more >averjs/nuxt-compression - npm
This is an unofficial compression module for Nuxt 3. Currently it only works with vite . It uses vite-plugin-compression to generate the ...
Read more >how to make a compressed js files with all pages in nuxt js
Well, code splitting the pages should make your page faster. Because each route loads ... You should check if your hoster supports HTTP2....
Read more >Vue and Nuxt Performance Optimization Checklist
Using your image CDN service or the compression of your image should be ... In Nuxt we have --modern with some options in...
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 FreeTop 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
Top GitHub Comments
yes, it works for static files, but not applied for html. why? google insights says “turn on gzip” for one source — the page itself
@pi0 can you please help me?