Фикс serviceworker

This commit is contained in:
Александр Кирюхин 2024-01-24 23:42:53 +03:00
parent 2c39a9b5b1
commit 10a355d0f1

View file

@ -3,8 +3,11 @@ import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa' import { VitePWA } from 'vite-plugin-pwa'
const manifest = { const manifest = {
registerType: 'prompt', registerType: 'autoUpdate',
includeAssets: ['assets/icon.png'], includeAssets: ['assets/icon.png', 'assets/logo.png'],
workbox: {
cleanupOutdatedCaches: true
},
manifest: { manifest: {
name: 'NQuest', name: 'NQuest',
short_name: 'NQuest', short_name: 'NQuest',
@ -61,7 +64,7 @@ const manifest = {
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react(), splitVendorChunkPlugin()/* , VitePWA(manifest) */], plugins: [react(), splitVendorChunkPlugin(), VitePWA(manifest)],
server: { server: {
proxy: { proxy: {
'/api': { '/api': {