变量是这样来的
let appid = process.env.appid
let isFFZ = process.env.appid == 'ffz'
let isLOTTERY = process.env.appid == 'lottery'
let isCLUB = process.env.appid == 'club'
let isFFZF = process.env.appid == 'ffzf'
let isPOCKET = process.env.appid == 'pocket'
let isTOOL = process.env.appid == 'tool'
export {
isiOS,
isInWx,
isCLUB,
isFFZ,
isFFZF,
isLOTTERY,
isPOCKET,
isTOOL
}
//判断加载路由
let router
if (isFFZ){
router = require('@/router/ffzindex').default
}
else if (isCLUB){
router = require('@/router/clubindex').default
}
else if(isLOTTERY){
router = require('@/router/index').default
}
else if(isFFZF){
router = require('@/router/ffzfindex').default
}
else if(isPOCKET){
router = require('@/router/pocketindex').default
}
else if(isTOOL){
router = require('@/router/toolrouter').default
}
如图,导致重复打包,判断引入也没用!求各位支招
isFFZ
你这些变量是变得,需要放在浏览器才能算出一个值,当然得全部打包了