A component (v1.0.0+ only) builder plugin for Handlebars template pre-compilation.
npm i --save component-build-handlebars
NOTE: There are 2 places that require your attention. First, you
need to add the plugin to the builder. Second, you need to add the
Handlebars runtime to your build.js. (either that, or include it on
your page via another <script>
tag)
var handlebars = require("component-build-handlebars");
// ...
// add the plugin to the builder
builder.use("templates", handlebars({
// options for Handlebars.precompile here, but you usually don't need any
}));
// ...
// add the runtime to your build (it's an assumed global)
builder.scripts(function (err, js) {
// ...
write("build.js", handlebars.runtime + js);
});