my project is a Vue component project, which only requires packaging components. When using unplugin vue components, packaging cannot create an external component library. Later, I wrote a vite plugin to insert components into the Vue file as needed. At this point, Vue3 can do it, while components written in Vue2 cannot be excluded
Describe the bug
my project is a Vue component project, which only requires packaging components. When using unplugin vue components, packaging cannot create an external component library. Later, I wrote a vite plugin to insert components into the Vue file as needed. At this point, Vue3 can do it, while components written in Vue2 cannot be excluded
build config
rollupOptions: { preserveEntrySignatures: 'strict', external: ['vue', 'axios','@enn/ency-design','element-plus', 'ElementPlusIconsVue'], output: { globals: { vue: 'Vue', axios: 'axios', 'element-plus':'ElementPlus', '@enn/ency-design': 'EncyDesign', ElementPlusIconsVue: 'ElementPlusIconsVue' } } }
Reproduction
none
System Info
Used Package Manager
pnpm
Validations