feat: implement pwa, add dockerfiles for web and cli, and introduce folder selection with wasm error handling.

This commit is contained in:
2026-02-14 19:44:19 -05:00
parent 91e7af0c04
commit 48aa59540a
17 changed files with 7637 additions and 127 deletions

View File

@@ -1,7 +1,44 @@
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()],
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
}
})
],
})