problem description
related codes
/ / Please paste the code text below (do not replace the code with pictures)
A:
export default {
name: "A",
data() {
return {
showB: appConfig["b"] // appConfigbfalse
};
},
methods: {
initComp() {
Vue.component("B", (resolve) => require(["./b.vue"], resolve));
}
},
created() {
if (this.showB) {
this.initComp();
}
}
};
what result do you expect?
when I was npm run build, I found that component B was still packaged.
I hope that component B is not packaged when the relevant configuration file is false. Is there any way not to package component through this configuration