50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
import { fileURLToPath, URL } from 'node:url';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,webp}']
|
|
},
|
|
manifest: {
|
|
name: '{{PROJECT_NAME}}',
|
|
short_name: '{{PROJECT_NAME}}',
|
|
description: 'PWA for {{MODEL_DISPLAY_NAME}} management with Odoo integration',
|
|
theme_color: '#667eea',
|
|
background_color: '#ffffff',
|
|
display: 'standalone',
|
|
icons: [
|
|
{
|
|
src: '/icon-192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: '/icon-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png'
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://localhost:3000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
});
|