diff options
Diffstat (limited to 'modern')
-rw-r--r-- | modern/public/manifest.json | 27 | ||||
-rw-r--r-- | modern/vite.config.js | 34 |
2 files changed, 33 insertions, 28 deletions
diff --git a/modern/public/manifest.json b/modern/public/manifest.json deleted file mode 100644 index 9142346c..00000000 --- a/modern/public/manifest.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "short_name": "${title}", - "name": "${description}", - "icons": [ - { - "src": "favicon.ico", - "sizes": "48x48 32x32 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192", - "purpose": "any maskable" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512", - "purpose": "any maskable" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "${colorPrimary}", - "background_color": "#ffffff" -} diff --git a/modern/vite.config.js b/modern/vite.config.js index 04cff5fb..56ffa1ec 100644 --- a/modern/vite.config.js +++ b/modern/vite.config.js @@ -14,5 +14,37 @@ export default defineConfig(() => ({ build: { outDir: 'build', }, - plugins: [svgr(), react(), VitePWA()], + plugins: [ + svgr(), + react(), + VitePWA({ + workbox: { + navigateFallbackDenylist: [/^\/api/], + }, + manifest: { + short_name: '${title}', + name: '${description}', + theme_color: '${colorPrimary}', + icons: [ + { + src: 'favicon.ico', + sizes: '48x48 32x32 16x16', + type: 'image/x-icon', + }, + { + src: 'logo192.png', + type: 'image/png', + sizes: '192x192', + purpose: 'any maskable', + }, + { + src: 'logo512.png', + type: 'image/png', + sizes: '512x512', + purpose: 'any maskable', + }, + ], + }, + }), + ], })); |