mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 05:56:29 +00:00
46 lines
1.0 KiB
JavaScript
46 lines
1.0 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
|
|
server: {
|
|
host: '0.0.0.0', // Listen on all network interfaces for LAN access
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
// Let Vite handle chunking automatically to avoid circular dependencies
|
|
// Element Plus will be bundled with its dependencies in the correct order
|
|
if (id.includes('node_modules')) {
|
|
if (id.includes('element-plus')) {
|
|
return 'element-plus'
|
|
}
|
|
// Group all other vendor code together
|
|
return 'vendor'
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|