61 lines
1.4 KiB
TypeScript
61 lines
1.4 KiB
TypeScript
import {defineConfig} from 'vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
],
|
|
optimizeDeps: {
|
|
include: [
|
|
'react',
|
|
'react-dom',
|
|
'react-router-dom',
|
|
],
|
|
exclude: [
|
|
// Exclude local Rust compilation artifacts - not npm packages
|
|
]
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
build: {
|
|
rolldownOptions: {
|
|
external: [
|
|
// Use forward slashes for cross-platform compatibility
|
|
'libs/',
|
|
'target/',
|
|
],
|
|
}
|
|
},
|
|
server: {
|
|
port: 4180,
|
|
hmr: {
|
|
overlay: true,
|
|
path: '/@vite-hmr',
|
|
},
|
|
watch: {
|
|
ignored: [
|
|
'**/target/**',
|
|
'**/libs/**',
|
|
'**/node_modules/**',
|
|
],
|
|
},
|
|
proxy: {
|
|
'/ws': {
|
|
target: 'http://localhost:8080',
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|