🚀 feat: Enhance PWA and asset caching strategy (#3822)

* chore: Update VitePWA registerType to 'autoUpdate', add cache busting to static file outputs

* chore: disable windows frontend workflow for now
This commit is contained in:
Danny Avila 2024-08-28 12:13:14 -04:00 committed by GitHub
parent 7c1ee242eb
commit 3b61322459
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 19 deletions

View file

@ -55,7 +55,7 @@ export default defineConfig({
nodePolyfills(),
VitePWA({
injectRegister: 'auto', // 'auto' | 'manual' | 'disabled'
registerType: 'prompt', // 'prompt' | 'auto' | 'disabled'
registerType: 'autoUpdate', // 'prompt' | 'autoUpdate'
devOptions: {
enabled: false, // enable/disable registering SW in development mode
},
@ -118,6 +118,9 @@ export default defineConfig({
return 'vendor';
}
},
entryFileNames: 'assets/[name].[hash].js',
chunkFileNames: 'assets/[name].[hash].js',
assetFileNames: 'assets/[name].[hash].[ext]',
},
/**
* Ignore "use client" waning since we are not using SSR