feat:添加接口签名
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
import path from "path";
|
||||
import { defineConfig ,loadEnv} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import createVitePlugins from './vite/plugins/index.js'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import createVitePlugins from './vite/plugins/index.js'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig(({ mode, command }) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
const { VITE_BASE_PATH } = env;
|
||||
const { VITE_BASE_PATH } = env;
|
||||
return {
|
||||
//生产环境使用相对路径,开发环境用 /
|
||||
base: command === 'build' ? './' : '/',
|
||||
build: {
|
||||
outDir: 'xSynergy-manage',
|
||||
},
|
||||
|
||||
plugins: createVitePlugins(env, command === "build"),
|
||||
server: {
|
||||
host: '0.0.0.0', // 关键配置,允许局域网访问
|
||||
@@ -19,14 +23,14 @@ export default defineConfig(({ mode, command }) => {
|
||||
hmr: { overlay: false },
|
||||
proxy: {
|
||||
'/dev-api': {
|
||||
target: 'https://xsynergy.gxtech.ltd',
|
||||
target: 'https://xsynergy.gxtech.ltd',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) =>
|
||||
path.replace(new RegExp(`^/dev-api`), '')
|
||||
},
|
||||
'/livekit-api': {
|
||||
target: 'https://meeting.cnsdt.com/api/v1',
|
||||
target: 'https://meeting.cnsdt.com/api/v1',
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
rewrite: (path) =>
|
||||
|
||||
Reference in New Issue
Block a user