feature: informacja przy braku podglądu; SW

This commit is contained in:
2022-12-31 21:04:33 +01:00
parent 81edc59074
commit 301d279fa6
6 changed files with 1852 additions and 1763 deletions
+19 -19
View File
@@ -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: 2,
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
devOptions: {
enabled: true,
},