45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
devOptions: {
|
|
enabled: true
|
|
},
|
|
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg', 'manifold.wasm'],
|
|
manifest: {
|
|
name: 'SVG Nametag Converter',
|
|
short_name: 'Nametag 3D',
|
|
description: 'Convert SVG files to 3D printable nametags offline.',
|
|
theme_color: '#1a1a1a',
|
|
background_color: '#1a1a1a',
|
|
display: 'standalone',
|
|
icons: [
|
|
{
|
|
src: 'pwa-192x192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'pwa-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png'
|
|
}
|
|
]
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,wasm}'],
|
|
maximumFileSizeToCacheInBytes: 41943040, // 40 MB, just to be safe for WASM
|
|
cleanupOutdatedCaches: true,
|
|
clientsClaim: true,
|
|
skipWaiting: true
|
|
}
|
|
})
|
|
],
|
|
})
|