Фикс serviceworker
This commit is contained in:
parent
2c39a9b5b1
commit
10a355d0f1
1 changed files with 6 additions and 3 deletions
|
@ -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': {
|
||||||
|
|
Loading…
Reference in a new issue