From d581a1f6c707d4f49d34b852ee8aec8236d80074 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 10 Nov 2023 10:56:08 +0100 Subject: [PATCH] add more configuration --- vite.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vite.config.js b/vite.config.js index 8981600..2fcde18 100644 --- a/vite.config.js +++ b/vite.config.js @@ -29,6 +29,11 @@ export default defineConfig(({ command, mode, ssrBuild }) => { plugins: [ viteCompression(), VitePWA({ + workbox: { + sourcemap: true, + cleanupOutdatedCaches: true, + globPatterns: ["**/*.{js,css,html,ico,png,svg}"], + }, includeAssets: [ "favicon/favicon.icon", "favicon/apple-touch-icon.png", @@ -36,6 +41,7 @@ export default defineConfig(({ command, mode, ssrBuild }) => { ], manifest: webManifest, registerType: "autoUpdate", + injectRegister: "auto", }), ], assetsInclude: ["**/*.md"], @@ -49,6 +55,11 @@ export default defineConfig(({ command, mode, ssrBuild }) => { plugins: [ viteCompression(), VitePWA({ + workbox: { + sourcemap: true, + cleanupOutdatedCaches: true, + globPatterns: ["**/*.{js,css,html,ico,png,svg}"], + }, includeAssets: [ "favicon/favicon.icon", "favicon/apple-touch-icon.png", @@ -56,6 +67,7 @@ export default defineConfig(({ command, mode, ssrBuild }) => { ], manifest: webManifest, registerType: "autoUpdate", + injectRegister: "auto", }), ], chunkSizeWarningLimit: 1600 * 2,