mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-07-16 09:38:51 +02:00
feat:#4 updated cache and workbox
This commit is contained in:
@ -11,7 +11,8 @@
|
||||
<link rel="mask-icon" href="/htwk-mask.svg" color="#00494c" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||
<meta name="theme-color" content="#1b2022">
|
||||
<link
|
||||
<script src="/registerSW.js"></script>
|
||||
<link
|
||||
id="theme-link"
|
||||
rel="stylesheet"
|
||||
href="/themes/lara-light-blue/theme.css"
|
||||
|
2
frontend/src/vite-env.d.ts
vendored
2
frontend/src/vite-env.d.ts
vendored
@ -15,3 +15,5 @@
|
||||
//along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module 'ical.js';
|
@ -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,
|
||||
|
Reference in New Issue
Block a user