mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-30 00:00:05 +08:00
feat: 新增登录接口请求
This commit is contained in:
+19
-3
@@ -1,16 +1,17 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
import { OUTPUT_DIR, brotliSize, chunkSizeWarningLimit, terserOptions, rollupOptions } from './build/constant'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
import { viteMockServe} from "vite-plugin-mock";
|
||||
import { axiosPre } from './src/settings/httpSetting'
|
||||
|
||||
function pathResolve(dir: string) {
|
||||
return resolve(process.cwd(), '.', dir)
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
export default ({ mode }) => defineConfig({
|
||||
base: process.env.NODE_ENV === 'production' ? './' : '/',
|
||||
// 路径重定向
|
||||
resolve: {
|
||||
alias: [
|
||||
@@ -34,6 +35,21 @@ export default defineConfig({
|
||||
}
|
||||
}
|
||||
},
|
||||
// 开发服务器配置
|
||||
server: {
|
||||
host: true,
|
||||
open: true,
|
||||
port: 3000,
|
||||
proxy: {
|
||||
[axiosPre]: {
|
||||
// @ts-ignore
|
||||
target: loadEnv(mode, process.cwd()).VITE_DEV_PATH,
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
secure: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
viteMockServe({
|
||||
|
||||
Reference in New Issue
Block a user