Babel Plugin Lodash Template Compile
Babel plugin for compiling lodash templates at compile-time, rather than run-time.
Install
npm install --save-dev babel-plugin-lodash-template-compile
Usage
Add this plugin to your babel plugins:
plugins:
This plugin supports the following options:
This plugin will compile lodash templates written like so at compile-time, so that your app won't waste time on this at run-time:
_.template '<%= obj.value %>' ;_.template "<%= obj.value %>" ;_.template `<%= obj.value %>` ;lodash.template '<%= obj.value %>' ;lodash.template "<%= obj.value %>" ;lodash.template `<%= obj.value %>` ;
Other ways to use lodash's template
function aren't currently supported.
License
MIT © Fabio Spampinato