template-studio/vite.config.ts

40 lines
984 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
cleanupOutdatedCaches: true,
clientsClaim: true,
skipWaiting: true,
navigateFallbackDenylist: [
/^\/api(?:\/|$)/,
/^\/auth(?:\/|$)/,
/^\/reset-pwa(?:\/|$)/
]
},
manifest: {
name: 'Arrowstack Template Studio',
short_name: 'Templates',
description: 'Mobile-first email and report template builder',
theme_color: '#111827',
background_color: '#f8fafc',
display: 'standalone',
start_url: '/',
icons: [
{ src: '/icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any maskable' }
]
}
})
],
server: {
proxy: {
'/api': 'http://localhost:3000'
}
}
})