rollup-plugin-pug
Rollup plugin that allows importing pug templates as HTML strings.
Installation
npm install --save-dev rollup-plugin-pug-html
Usage
Create the template:
//- template.pugp Hello #{ name }
Import the template:
// main.js;console; // <p>Hello World</p>
And build with something like...
;;
That's it.
Options
This plugin is using the following pug options as defaults:
doctype: 'html' name: 'template' compileDebug: false inlineRuntimeFunctions: false context: {}
See the full list and explanation in the API Documentation of the Pug site.
Licence
MIT