mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-04 13:58:12 +00:00
PWA: wyłączono funkcję
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
"firebase": "^9.8.1",
|
"firebase": "^9.8.1",
|
||||||
"howler": "^2.2.1",
|
"howler": "^2.2.1",
|
||||||
"pinia": "^2.0.14",
|
"pinia": "^2.0.14",
|
||||||
"register-service-worker": "^1.7.1",
|
|
||||||
"sass": "^1.53.0",
|
"sass": "^1.53.0",
|
||||||
"socket.io-client": "^4.4.1",
|
"socket.io-client": "^4.4.1",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.37",
|
||||||
@@ -26,7 +25,6 @@
|
|||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"typescript": "^4.6.4",
|
"typescript": "^4.6.4",
|
||||||
"vite": "^3.0.0",
|
"vite": "^3.0.0",
|
||||||
"vite-plugin-pwa": "^0.12.3",
|
|
||||||
"vue-tsc": "^0.38.4"
|
"vue-tsc": "^0.38.4"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
|||||||
+28
-29
@@ -1,35 +1,34 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [vue()],
|
||||||
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,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 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,
|
||||||
|
// },
|
||||||
|
// }),
|
||||||
|
|||||||
Reference in New Issue
Block a user