32 lines
742 B
TypeScript
32 lines
742 B
TypeScript
import tailwindcss from '@tailwindcss/vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
import path from 'path'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
// Development server configuration
|
|
server: {
|
|
port: 8001,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
// Production build optimization
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false, // Disable source maps in production for security
|
|
},
|
|
// For reverse proxy deployment, ensure assets are served from root
|
|
base: '/',
|
|
})
|