0👍
As far as I know tree shaking works on script level not on vue template. Maybe you should try to pass client component/module to template?
<template>
<div :is="clientModule"></div>
</template>
created() {
if(process.env.VUE_APP_CLIENT === 'A') {
this.clientModule = moduleClientA
}
else {
this.clientModule = moduleClientB
}
}
If I’m wrong you need also fix computed property because you use ‘=’ instead of ‘==’.
- [Vuejs]-Saving array and objects within said array
- [Vuejs]-VUe.js run serve failing after installation
Source:stackexchange.com