46 lines
1001 B
JavaScript
46 lines
1001 B
JavaScript
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
// Base public path
|
|
base: './',
|
|
|
|
// Development server configuration
|
|
server: {
|
|
port: 5173,
|
|
open: true, // Auto-open browser
|
|
host: true, // Listen on all addresses
|
|
},
|
|
|
|
// Preview server configuration
|
|
preview: {
|
|
port: 5174,
|
|
open: false, // Don't auto-open in Docker
|
|
host: true, // Listen on all addresses
|
|
allowedHosts: ['.ezsepa.com', 'www.ezsepa.com'], // Allow proxy domains
|
|
},
|
|
|
|
// Build configuration
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
sourcemap: false, // Disable source maps in production
|
|
minify: 'terser',
|
|
terserOptions: {
|
|
compress: {
|
|
drop_console: true, // Remove console.logs in production
|
|
drop_debugger: true,
|
|
},
|
|
},
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: undefined, // Single chunk for small app
|
|
},
|
|
},
|
|
},
|
|
|
|
// CSS configuration
|
|
css: {
|
|
postcss: './postcss.config.js',
|
|
},
|
|
});
|