refactor: rename ad components at build

pull/370/head
Eduardo San Martin Morote 4 years ago
parent 7b3a9e59b4
commit c3ce55dfb4

@ -64,7 +64,9 @@ export async function bundle(
if (!chunk.isEntry && /runtime/.test(chunk.name)) {
return `assets/framework.[hash].js`
}
return `assets/[name].[hash].js`
return adComponentRE.test(chunk.name)
? `assets/ui-custom.[hash].js`
: `assets/[name].[hash].js`
}
})
}
@ -95,3 +97,5 @@ export async function bundle(
return [clientResult, serverResult, pageToHashMap]
}
const adComponentRE = /(?:Carbon|BuySell)Ads/

Loading…
Cancel
Save