mirror of
https://github.com/traccar/traccar-web.git
synced 2025-01-08 12:07:27 +08:00
Fix PWA issues
This commit is contained in:
parent
667d0f68da
commit
5c847625b8
@ -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"
|
||||
}
|
@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user