Bundle Vue library with Bili

Create a Vue plugin

mkdir my-component && cd my-component
yarn init -y
yarn add bili --dev
export default Vue => {
Vue.component('my-component', {
render: h => h('h2', null, ['hello bili'])
import Component from './MyComponent.vue'
export default Vue => Vue.component(Component.name, Component)
export default {
name: 'my-component'
<!-- let's add some style too :) -->
<style scoped>
h1 {
color: red
yarn add rollup-plugin-vue vue-template-compiler --dev
yarn bili index.js --plugin vue

Bundle in multiple formats

yarn bili index.js --plugin vue --format cjs,umd --moduleName MyComponent

Wrapping Up




Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store