This commit is contained in:
hptangxi
2025-07-01 22:52:48 +08:00
parent dcb862b11a
commit d48384af80
26 changed files with 3528 additions and 0 deletions

31
fe/vite.config.ts Normal file
View File

@@ -0,0 +1,31 @@
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: {
// 代理配置示例
proxy: {
'/api': {
target: 'http://api.example.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
},
// 构建配置
build: {
outDir: 'dist',
assetsDir: 'assets'
}
})