You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
425 B
16 lines
425 B
const AD_COMPONENTS = ['uniad', 'ad-rewarded-video', 'ad-fullscreen-video', 'ad-interstitial']
|
|
|
|
module.exports = {
|
|
preTransformNode (el, {
|
|
warn
|
|
}) {
|
|
if (process.env.UNI_PLATFORM === 'mp-weixin') {
|
|
if (el.tag === 'ad' && (el.attrsMap.adpid || el.attrsMap[':adpid'])) {
|
|
el.tag = 'uniad'
|
|
}
|
|
if (AD_COMPONENTS.indexOf(el.tag) > -1) {
|
|
process.env.USE_UNI_AD = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|