49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
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: {
|
|
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: {
|
|
'@': '/src'
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://localhost:3000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
});
|