mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
fix(projects): fix vite-pwa plugin config
This commit is contained in:
31
build/plugins/pwa.ts
Normal file
31
build/plugins/pwa.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
export default function setupVitePwa() {
|
||||
return VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
includeAssets: ['favicon.ico'],
|
||||
manifest: {
|
||||
name: 'SoybeanAdmin',
|
||||
short_name: 'SoybeanAdmin',
|
||||
theme_color: '#fff',
|
||||
icons: [
|
||||
{
|
||||
src: '/logo.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: '/logo.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: '/logo.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'any maskable'
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user