Rollup plugin that compiles doT.js template files (.dot, .tpl) into JavaScript functions during bundling. Current stable version is 1.1.0. The plugin provides a seamless integration of doT templates with Rollup, enabling imports like `import view from './view.dot'`. It supports include/exclude patterns, custom doT template settings, and template defines. Key differentiators: minimal configuration, TypeScript type definitions included, and supports both .dot and .tpl extensions. Unlike alternatives, it focuses solely on doT without additional template engine overhead.
npm install rollup-plugin-dotVerified import paths — ran on the pinned version, not inferred.
Shows basic rollup-plugin-dot setup with include pattern, template settings, and defines.
Use default import: `import dot from 'rollup-plugin-dot'`
Use default import: `import dot from 'rollup-plugin-dot'`
Use `const dot = require('rollup-plugin-dot')` instead of destructuringAdd `include: ['**/*.tpl']` to process .tpl files
Ensure templateSettings keys match doT documentation exactly
Run `npm install -D dot` or `yarn add -D dot`
Use `import dot from 'rollup-plugin-dot'`
Add the dot plugin to the plugins array in rollup.config.js