You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
752 B
TypeScript
33 lines
752 B
TypeScript
1 year ago
|
import { VitePWA } from 'vite-plugin-pwa'
|
||
|
|
||
|
export default function setupVitePwa() {
|
||
|
// https://github.com/antfu/vite-plugin-pwa
|
||
|
return VitePWA({
|
||
|
registerType: 'autoUpdate',
|
||
|
includeAssets: ['favicon.svg', 'safari-pinned-tab.svg'],
|
||
|
manifest: {
|
||
|
name: 'N-Admin',
|
||
|
short_name: 'N-Admin',
|
||
|
theme_color: '#ffffff',
|
||
|
icons: [
|
||
|
{
|
||
|
src: '/pwa-192x192.png',
|
||
|
sizes: '192x192',
|
||
|
type: 'image/png',
|
||
|
},
|
||
|
{
|
||
|
src: '/pwa-512x512.png',
|
||
|
sizes: '512x512',
|
||
|
type: 'image/png',
|
||
|
},
|
||
|
{
|
||
|
src: '/pwa-512x512.png',
|
||
|
sizes: '512x512',
|
||
|
type: 'image/png',
|
||
|
purpose: 'any maskable',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
})
|
||
|
}
|