use rollup-plugin-vue to transform app.vue:
<script>
import App2 from './app2.vue'
export default {
render(h) {
return h(App2)
}
}
</script>
function __vue_normalize__() {}
function __vue_create_injector__() {}
function __vue_normalize__() {}
function __vue_create_injector__() {}
function __vue_normalize__$1() {}
function __vue_create_injector__$1() {}
If a Vue component library has a large number of components, rollup is not that much cheaper than webpack.
I already have this on my todo list. Expect a fix by this weekend.
@znck Please note that if option css: false was specified, dead code __vue_create_injector__ and __vue_create_injector_ssr__ were also generated. And please do not add arguments to function __vue_normalize__ if not needed, since optimization tools like uglify-es cannot remove dead code entirely.
@znck any updates on this? My UI library went from 15KB to 20KB after switching to v4. Thanks for a great plugin!
Version 4.4.0-alpha.0 is published with external assemble helpers.
Could you please try that? Waiting on feedback if this approach is helpful.
Most helpful comment
@znck Please note that if option
css: falsewas specified, dead code__vue_create_injector__and__vue_create_injector_ssr__were also generated. And please do not add arguments to function__vue_normalize__if not needed, since optimization tools likeuglify-escannot remove dead code entirely.