rollup-plugin-vue-template-compiler
Rollup plugin to compile Vue.js 2.0 templates.
npm i rollup-plugin-vue-template-compiler --save-dev
Sample rollup config
;; entry: 'index.js' dest: 'dist/app.js' format: 'umd' plugins: ;
Usage
import template from './template.html'
template
will be an object
render: Function staticRenderFns: Array<Function>
Set render
and staticRenderFns
properties on a component e.g:
// manually const myComponent = render: templaterender staticRenderFns: templatestaticRenderFns {} // mixin const myComponent = mixins: template {} // stage2 object spread const myComponent = ...template {}