Merge remote-tracking branch 'origin' into 3-semi-offline-room-finder

This commit is contained in:
survellow
2024-05-29 23:19:48 +02:00
31 changed files with 1745 additions and 1541 deletions

View File

@@ -18,12 +18,12 @@ import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath } from "node:url";
import { VitePWA } from 'vite-plugin-pwa';
import mkcert from 'vite-plugin-mkcert';
import basicSsl from '@vitejs/plugin-basic-ssl'
export default defineConfig({
plugins: [
vue(),
mkcert(),
basicSsl(),
VitePWA({
mode: 'development',
base: '/',
@@ -67,7 +67,21 @@ export default defineConfig({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}'],
cleanupOutdatedCaches: true
cleanupOutdatedCaches: true,
runtimeCaching: [
{
urlPattern: /^https?.*/,
handler: 'NetworkFirst',
options: {
cacheName: 'https-calls',
expiration: {
maxEntries: 150,
maxAgeSeconds: 30 * 12 * 60 * 60, // 1 month
},
networkTimeoutSeconds: 10, // fall back to cache if api does not response within 10 seconds
},
},
],
},
devOptions: {
enabled: true,