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(),