From 10a355d0f1db387018b70d617a51f66983b5f885 Mon Sep 17 00:00:00 2001 From: NeonXP Date: Wed, 24 Jan 2024 23:42:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20serviceworker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/vite.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 06d8b13..448bbf6 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -3,8 +3,11 @@ import react from '@vitejs/plugin-react' import { VitePWA } from 'vite-plugin-pwa' const manifest = { - registerType: 'prompt', - includeAssets: ['assets/icon.png'], + registerType: 'autoUpdate', + includeAssets: ['assets/icon.png', 'assets/logo.png'], + workbox: { + cleanupOutdatedCaches: true + }, manifest: { name: 'NQuest', short_name: 'NQuest', @@ -61,7 +64,7 @@ const manifest = { // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), splitVendorChunkPlugin()/* , VitePWA(manifest) */], + plugins: [react(), splitVendorChunkPlugin(), VitePWA(manifest)], server: { proxy: { '/api': {