本地启动

This commit is contained in:
2024-05-07 00:03:52 +08:00
parent 58929c05ef
commit acc59c3a9e
3 changed files with 1583 additions and 1558 deletions

View File

@@ -4,7 +4,8 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
#VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
VITE_BASE_URL='http://localhost:48080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'

View File

@@ -30,16 +30,16 @@ export default ({ command, mode }) => {
// 端口号
port: env.VITE_PORT,
host: '0.0.0.0',
open: env.VITE_OPEN === 'true'
open: env.VITE_OPEN === 'true',
// 本地跨域代理. 目前注释的原因暂时没有用途server 端已经支持跨域
// proxy: {
// ['/admin-api']: {
// target: env.VITE_BASE_URL,
// ws: false,
// changeOrigin: true,
// rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
// },
// },
proxy: {
['/admin-api']: {
target: env.VITE_BASE_URL,
ws: false,
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
},
},
},
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
plugins: createVitePlugins(),

3120
yarn.lock

File diff suppressed because it is too large Load Diff