feat(project): 配置项目别名和turbo工作流- 添加 @ 别名指向 src 目录

- 配置 turbo 工作流支持
- 更新 package.json 脚本和依赖
- 调整路由和组件导入路径
- 格式化模板代码和样式
- 新增模块配置文件和工作区设置
This commit is contained in:
2025-10-12 01:25:39 +08:00
parent 5d20a7def3
commit 6a412b3567
11 changed files with 49 additions and 15 deletions

View File

@@ -1,16 +1,22 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import * as path from "node:path";
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
server: {
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
// rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
})
})