rollup-plugin-mustache
Precompiles Mustache templates using Hogan.js.
Installation
npm install --save-dev rollup-plugin-mustache
Usage
First, configure Rollup:
entry: 'src/index.js' dest: 'dist/my-lib.js' plugins: // ... other plugins here ... // Needed to import Hogan.js
Then, import a template and render it:
const html = mainTemplateconsole
Options
hoganKey
By default, this plugin will import Hogan.js into your build. If you already
have it imported some other way, you should most likely override the hoganKey
option with just 'hogan.js'
and let Rollup resolve it. Alternatively, you can
specify the full path to the main file.
include
and exclude
From rollup-pluginutils.
Author
License
MIT