refine nginx caching strategy and add service worker update prompt with periodic checks
Some checks failed
Build and Push Docker Images / build-backend (push) Has been cancelled
Build and Push Docker Images / build-frontend (push) Has been cancelled

This commit is contained in:
Egor Pozharov
2026-04-21 12:55:01 +06:00
parent 60dea22ced
commit 4110083019
6 changed files with 96 additions and 16 deletions

View File

@@ -9,10 +9,11 @@ export default defineConfig({
react(),
tailwindcss(),
VitePWA({
registerType: 'autoUpdate',
registerType: 'prompt',
manifest: false, // manifest.json from public
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
cleanupOutdatedCaches: true,
runtimeCaching: [
{
urlPattern: /^https:\/\/.*\/api\//,