defineComponent不支持tree-shaking
KesionX opened this issue · comments
Kesion commented
我在组件库内使用capi,发现它会导致打包的时候无法tree-shaking
eg:
组件A
export default defineComponent({
name: 'xx',
setup() {}
})
index.js
import A from 'a.vue'
// not use A
console.log('hello');
打包后仍然会把A打入
ZHAO Jin-Xiang commented
Please provide a minimal reproduction.
github-actions commented
Stale issue message