feat: update Vite PWA configuration for improved caching and asset management
This commit is contained in:
@@ -42,7 +42,12 @@ export default defineConfig({
|
||||
}),
|
||||
VitePWA({
|
||||
registerType: "autoUpdate",
|
||||
includeAssets: ["favicon.svg", "apple-touch-icon.png"],
|
||||
injectRegister: "auto",
|
||||
includeAssets: ["favicon.svg"],
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
type: "module",
|
||||
},
|
||||
manifest: {
|
||||
name: "Riwa",
|
||||
short_name: "Riwa",
|
||||
@@ -58,8 +63,9 @@ export default defineConfig({
|
||||
icons: [
|
||||
{
|
||||
src: "/favicon.svg",
|
||||
sizes: "192x192",
|
||||
type: "image/svg",
|
||||
sizes: "any",
|
||||
type: "image/svg+xml",
|
||||
purpose: "any maskable",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -67,6 +73,9 @@ export default defineConfig({
|
||||
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
|
||||
navigateFallback: "/index.html",
|
||||
navigateFallbackDenylist: [/^\/api/],
|
||||
cleanupOutdatedCaches: true,
|
||||
clientsClaim: true,
|
||||
skipWaiting: true,
|
||||
},
|
||||
}),
|
||||
generateVersion({
|
||||
|
||||
Reference in New Issue
Block a user