Files
CheckInApp/apps/frontend/vite.config.js
T
8a12744 d4d6f87730 refactor(structure): reorganize app layout
BREAKING CHANGE: root backend/frontend directories and old run/manage entrypoints were removed. Use apps/backend, apps/frontend, and python main.py commands instead.
2026-05-03 16:43:11 +08:00

46 lines
969 B
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) {
// Manual chunking for better dependency management
if (id.includes('node_modules')) {
// Ant Design Vue
if (id.includes('ant-design-vue')) {
return 'ant-design-vue';
}
// Group all other vendor code together
return 'vendor';
}
},
},
},
},
});