From 2d64cc1f5ccfb862e4235f66b642654914e137f7 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 27 Nov 2022 15:36:50 +0100 Subject: [PATCH] Workbox --- vite.config.ts | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index bf232d0..83aacd8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,25 +9,25 @@ export default defineConfig({ vue(), VitePWA({ registerType: 'autoUpdate', - workbox: { - globPatterns: ['**/*.{js,css,html,png,svg,img}'], - runtimeCaching: [ - { - urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`), - handler: 'NetworkFirst', - options: { - cacheName: 'github-api-cache', - expiration: { - maxEntries: 400, - maxAgeSeconds: 60 * 60 * 24 * 30, // <== 30 days - }, - cacheableResponse: { - statuses: [0, 200], - }, - }, - }, - ], - }, + // workbox: { + // globPatterns: ['**/*.{js,css,html,png,svg,img}'], + // runtimeCaching: [ + // { + // urlPattern: new RegExp(`^https://spythere.github.io/api\/.*`), + // handler: 'NetworkFirst', + // options: { + // cacheName: 'github-api-cache', + // expiration: { + // maxEntries: 400, + // maxAgeSeconds: 60 * 60 * 24 * 30, // <== 30 days + // }, + // cacheableResponse: { + // statuses: [0, 200], + // }, + // }, + // }, + // ], + // }, devOptions: { enabled: true, },