diff --git a/src/api/axios.ts b/src/api/axios.ts index 8668030..58df750 100644 --- a/src/api/axios.ts +++ b/src/api/axios.ts @@ -19,7 +19,7 @@ export interface MyRequestInstance extends Axios { } const axiosInstance = axios.create({ - baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : ''}${axiosPre}`, + baseURL: `${import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : import.meta.env.VITE_DEV_PATH }${axiosPre}`, timeout: ResultEnum.TIMEOUT, }) as unknown as MyRequestInstance diff --git a/vite.config.ts b/vite.config.ts index ad47cad..0c3986e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -41,20 +41,20 @@ export default ({ mode }) => 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, - } - } - }, + // 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(), monacoEditorPlugin({