Files
web-app/vite.config.js

43 lines
942 B
JavaScript
Raw Permalink Normal View History

2026-08-15 05:27:48 +03:00
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { VitePWA } from 'vite-plugin-pwa'
2026-09-08 17:38:13 +03:00
import { fileURLToPath, URL } from 'node:url'
2026-08-15 05:27:48 +03:00
export default defineConfig({
plugins: [
svelte(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'UnitPrint',
short_name: 'UnitPrint',
start_url: '/',
display: 'standalone',
background_color: '#ffffff',
theme_color: '#ff3e00',
icons: [
{
src: '/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
}
]
}
})
],
2026-09-08 17:38:13 +03:00
resolve: {
alias: {
$lib: fileURLToPath(new URL('./src/lib', import.meta.url))
}
},
server: {
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
2026-08-15 05:27:48 +03:00
})