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
|
const baseURL = import.meta.env.VITE_SERVER_BASEURL
|
||||||
|
console.log(import.meta.env)
|
||||||
|
|
||||||
// 拦截器配置
|
// 拦截器配置
|
||||||
const httpInterceptor = {
|
const httpInterceptor = {
|
||||||
|
@ -46,6 +46,7 @@ export default ({ command, mode }) => {
|
|||||||
console.log(env)
|
console.log(env)
|
||||||
console.log(process.env.UNI_PLATFORM) // 得到 mp-weixin, h5 等
|
console.log(process.env.UNI_PLATFORM) // 得到 mp-weixin, h5 等
|
||||||
return defineConfig({
|
return defineConfig({
|
||||||
|
envDir: './env',
|
||||||
plugins: [
|
plugins: [
|
||||||
UniPages({ exclude: ['**/components/**/**.*'] }),
|
UniPages({ exclude: ['**/components/**/**.*'] }),
|
||||||
UniPlatform(),
|
UniPlatform(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user