PWA: wyłączono funkcję

This commit is contained in:
2022-07-19 22:56:27 +02:00
parent ff7ca27fe6
commit a392991030
3 changed files with 1063 additions and 3146 deletions
-2
View File
@@ -13,7 +13,6 @@
"firebase": "^9.8.1",
"howler": "^2.2.1",
"pinia": "^2.0.14",
"register-service-worker": "^1.7.1",
"sass": "^1.53.0",
"socket.io-client": "^4.4.1",
"vue": "^3.2.37",
@@ -26,7 +25,6 @@
"axios": "^0.21.1",
"typescript": "^4.6.4",
"vite": "^3.0.0",
"vite-plugin-pwa": "^0.12.3",
"vue-tsc": "^0.38.4"
},
"browserslist": [
+28 -29
View File
@@ -1,35 +1,34 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'],
runtimeCaching: [
{
urlPattern: new RegExp('^https://stacjownik.eu-4.evennode.com/api/getSceneries'),
handler: 'NetworkFirst',
options: {
cacheName: 'sceneries-cache',
expiration: {
maxEntries: 200,
maxAgeSeconds: 60 * 60 * 24 * 60, // <== 60 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
devOptions: {
enabled: true,
},
}),
],
plugins: [vue()],
});
// PWA
// VitePWA({
// registerType: 'autoUpdate',
// workbox: {
// globPatterns: ['**/*.{js,css,html,png,svg,img}'],
// runtimeCaching: [
// {
// urlPattern: new RegExp('^https://stacjownik.eu-4.evennode.com/api/getSceneries'),
// handler: 'NetworkFirst',
// options: {
// cacheName: 'sceneries-cache',
// expiration: {
// maxEntries: 200,
// maxAgeSeconds: 60 * 60 * 24 * 60, // <== 60 days
// },
// cacheableResponse: {
// statuses: [0, 200],
// },
// },
// },
// ],
// },
// devOptions: {
// enabled: true,
// },
// }),
+1035 -3115
View File
File diff suppressed because it is too large Load Diff