fix(env): 环境变量不生效bug

This commit is contained in:
Burt 2024-01-09 08:26:47 +08:00
parent d05dae4cbf
commit 7e5e54678f
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ type Data<T> = {
// 请求基地址
const baseURL = import.meta.env.VITE_SERVER_BASEURL
console.log(import.meta.env)
// 拦截器配置
const httpInterceptor = {

View File

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