This commit is contained in:
2025-09-25 14:38:57 +08:00
commit 662832364b
34 changed files with 13678 additions and 0 deletions

46
vite.config.js Normal file
View File

@@ -0,0 +1,46 @@
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'
// https://vitejs.dev/config/
export default defineConfig({
base: '/',
plugins: [vue()],
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
server: {
port: 5176,
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://192.168.0.11:3000',
changeOrigin: true
},
'/mid': {
target: 'http://localhost:3005',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/mid/, '')
},
'/uploads': {
target: 'http://localhost:3000',
changeOrigin: true
}
}
},
build: {
outDir: 'dist',
assetsDir: 'assets',
rollupOptions: {
output: {
manualChunks: {
vendor: ['vue', 'vue-router', 'pinia'],
elementPlus: ['element-plus'],
charts: ['echarts', 'vue-echarts']
}
}
}
}
})