mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
feat: integrate PWA support and update manifest configuration
- Added PWA support using vite-plugin-pwa, including configuration for service worker and caching strategies. - Updated index.html to include necessary meta tags for iOS Safari PWA support. - Changed references from site.webmanifest to manifest.webmanifest for consistency. - Removed redundant manifest generation from the favicon script, as it is now handled by vite-plugin-pwa. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -104,30 +104,7 @@ export async function generateFavicons() {
|
||||
writeFileSync(faviconPath, faviconBuffer)
|
||||
console.info(`✅ Generated main favicon: favicon.ico`)
|
||||
|
||||
// 生成 site.webmanifest
|
||||
const manifest = {
|
||||
name: 'Afilmory',
|
||||
short_name: 'Afilmory',
|
||||
icons: [
|
||||
{
|
||||
src: '/android-chrome-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: '/android-chrome-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
},
|
||||
],
|
||||
theme_color: '#0a0a0a',
|
||||
background_color: '#0a0a0a',
|
||||
display: 'standalone',
|
||||
}
|
||||
|
||||
const manifestPath = join(outputDir, 'site.webmanifest')
|
||||
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2))
|
||||
console.info(`✅ Generated web manifest: site.webmanifest`)
|
||||
// PWA manifest 由 vite-plugin-pwa 生成,这里不再生成重复的文件
|
||||
|
||||
console.info(
|
||||
`🎨 All favicons generated successfully from logo.jpg with rounded corners!`,
|
||||
|
||||
Reference in New Issue
Block a user