A Rollup plugin (v1.0.0, single release) that converts Underscore templates into ES modules for use in Backbone/Marionette apps. Unlike other template compilers, it forces explicit namespace variable access (no `with` statement) to maintain ES2015 strict mode compatibility. Requires manual injection of Underscore or other libraries into template scope, as Rollup's module bundling can't guarantee global access. Minimal configuration with include/exclude patterns and custom variable name. Stable but essentially feature-complete.
npm install rollup-plugin-underscorifyVerified import paths — ran on the pinned version, not inferred.
Shows minimal Rollup config using the plugin to compile .tpl files into Underscore template modules.
Always prefix data properties with the configured variable, e.g., `<%= p.username %>`.
Pass `_` as part of the template data, e.g., `tplData._ = _;`.
Use a suitable `output.format` like 'iife' or 'umd'.
Always use variable prefix (e.g., `p.`) in template expressions.
Run `npm install rollup-plugin-underscorify --save-dev` and ensure node_modules path is correct.
Use `import` syntax in your Rollup config (requires Rollup ESM config support).
Change import to `import underscorify from 'rollup-plugin-underscorify'`.