From 7e5e54678f466bb3a13713b00b3ad78635ccd767 Mon Sep 17 00:00:00 2001 From: Burt <1020103647@qq.com> Date: Tue, 9 Jan 2024 08:26:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(env):=20=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E4=B8=8D=E7=94=9F=E6=95=88bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http.ts | 1 + vite.config.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/utils/http.ts b/src/utils/http.ts index 80c4b22..3f766f7 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -11,6 +11,7 @@ type Data = { // 请求基地址 const baseURL = import.meta.env.VITE_SERVER_BASEURL +console.log(import.meta.env) // 拦截器配置 const httpInterceptor = { diff --git a/vite.config.ts b/vite.config.ts index 9300af3..fa0feff 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -46,6 +46,7 @@ export default ({ command, mode }) => { console.log(env) console.log(process.env.UNI_PLATFORM) // 得到 mp-weixin, h5 等 return defineConfig({ + envDir: './env', plugins: [ UniPages({ exclude: ['**/components/**/**.*'] }), UniPlatform(),