dollhouse-pwa/vite.config.js

39 lines
1022 B
JavaScript

import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
VitePWA({
registerType: 'autoUpdate',
injectRegister: null,
includeAssets: ['assets/production-sheet.png', 'icon.svg'],
manifest: {
name: 'My Dollhouse',
short_name: 'Dollhouse',
description: 'A cozy little dollhouse game for decorating and play.',
theme_color: '#f7a9c4',
background_color: '#fff7fb',
display: 'standalone',
orientation: 'any',
start_url: '/',
scope: '/',
icons: [
{
src: '/icon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'any maskable'
}
]
},
workbox: {
cleanupOutdatedCaches: true,
clientsClaim: true,
skipWaiting: true,
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
globPatterns: ['**/*.{js,css,html,png,svg}']
}
})
]
})