登录页面init

This commit is contained in:
2024-08-19 14:01:14 +08:00
parent 74bd16dc51
commit 41babdfa5c
22 changed files with 244 additions and 139 deletions

View File

@@ -4,12 +4,7 @@ import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig((config) => {
// 根据当前工作目录中的 `mode` 加载 .env 文件
// 设置第三个参数为 '' 来加载所有环境变量,而不管是否有 `VITE_` 前缀。
const {command, mode} = config
const env = loadEnv(mode, process.cwd(), '')
return {
plugins: [
vue(),
@@ -52,5 +47,16 @@ export default defineConfig((config) => {
},
},
},
server: {
host: '0.0.0.0',
open: false,
proxy: {
'/api': {
target: 'http://192.168.1.125:18092', //hsw
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
}
}
},
}
})