From 3a5ef7e025dba7f8e977e0fdc93a862eceecf62e Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 7 Oct 2025 18:37:27 +0200 Subject: [PATCH] hotfix: preload & prefetch optimization --- index.html | 64 ++++++++++++++++++++++++++++++++++++++++++++++---- vite.config.ts | 6 ++--- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 5f383af..981eb4f 100644 --- a/index.html +++ b/index.html @@ -22,10 +22,64 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -36,10 +90,12 @@ property="og:description" content="Pomocnik maszynisty i dyżurnego symulatora Train Driver 2" /> + + diff --git a/vite.config.ts b/vite.config.ts index 0ea2f10..c888bfc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,7 +5,7 @@ import path from 'path'; export default defineConfig({ server: { port: 5123, open: true }, - preview: { port: 4001, open: true }, + preview: { port: 4001, open: false }, publicDir: 'public', css: { preprocessorOptions: { @@ -23,7 +23,7 @@ export default defineConfig({ registerType: 'autoUpdate', workbox: { disableDevLogs: true, - globPatterns: ['**/*.{js,css,html,png,svg,jpg,ico,woff,woff2,ttf}'], + globPatterns: ['**/*.{js,css,html,ico,woff,woff2,ttf}', '**/*.{png,jpg,jpeg,svg,webp,gif}'], cleanupOutdatedCaches: true, runtimeCaching: [ { @@ -34,7 +34,7 @@ export default defineConfig({ cacheName: 'stacjownik-api-cache', cacheableResponse: { statuses: [0, 200] } } - }, + } ] }, devOptions: { enabled: true, suppressWarnings: true }