diff --git a/package.json b/package.json index 9ceb932..5ab7aa2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stacjownik", - "version": "1.15.0", + "version": "1.15.1", "private": true, "scripts": { "dev": "vite", diff --git a/vite.config.ts b/vite.config.ts index 44c3e28..d69430c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,55 +1,55 @@ -import { defineConfig } from 'vite'; -import vue from '@vitejs/plugin-vue'; -import { VitePWA } from 'vite-plugin-pwa'; - -export default defineConfig({ - server: { - port: 5001, - }, - plugins: [ - vue(), - VitePWA({ - registerType: 'prompt', - - workbox: { - globPatterns: ['**/*.{js,css,html,png,svg,jpg}'], - runtimeCaching: [ - { - urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'), - handler: 'NetworkFirst', - options: { - cacheName: 'sceneries-cache', - expiration: { - maxEntries: 1, - maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days - }, - cacheableResponse: { - statuses: [0, 200], - }, - }, - }, - { - urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i, - handler: 'CacheFirst', - options: { - cacheName: 'images-cache', - expiration: { - maxEntries: 100, - maxAgeSeconds: 60 * 60 * 24 * 60, - }, - cacheableResponse: { - statuses: [0, 200, 404], - }, - }, - }, - ], - }, - devOptions: { - enabled: true, - }, - }), - ], -}); - - - +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; +import { VitePWA } from 'vite-plugin-pwa'; + +export default defineConfig({ + server: { + port: 5001, + }, + plugins: [ + vue(), + VitePWA({ + registerType: 'autoUpdate', + + workbox: { + globPatterns: ['**/*.{js,css,html,png,svg,jpg}'], + runtimeCaching: [ + { + urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'), + handler: 'NetworkFirst', + options: { + cacheName: 'sceneries-cache', + expiration: { + maxEntries: 1, + maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days + }, + cacheableResponse: { + statuses: [0, 200], + }, + }, + }, + { + urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i, + handler: 'CacheFirst', + options: { + cacheName: 'images-cache', + expiration: { + maxEntries: 100, + maxAgeSeconds: 60 * 60 * 24 * 60, + }, + cacheableResponse: { + statuses: [0, 200, 404], + }, + }, + }, + ], + }, + devOptions: { + enabled: true, + }, + }), + ], +}); + + +