fix(env): 环境变量不生效bug
This commit is contained in:
parent
d05dae4cbf
commit
7e5e54678f
@ -11,6 +11,7 @@ type Data<T> = {
|
||||
|
||||
// 请求基地址
|
||||
const baseURL = import.meta.env.VITE_SERVER_BASEURL
|
||||
console.log(import.meta.env)
|
||||
|
||||
// 拦截器配置
|
||||
const httpInterceptor = {
|
||||
|
@ -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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user