A Rollup plugin that loads .ejs (Embedded JavaScript) template files, either returning a compiled render function or rendering to HTML at build time. Current stable version is 4.0.1. Supports file inclusion, SCSS compilation via a linked sass peer dependency, HTML minification via html-minifier, and CSS inlining via the inlineStyles option. The plugin dynamically imports peer dependencies, requiring Node 13.2.0+ when bundling in es format. It is a focused EJS integration for Rollup with no major alternatives in the npm ecosystem.
npm install rollup-plugin-ejsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Rollup configuration using rollup-plugin-ejs with compiler options, render data, and inline styles enabled.
Install relevant peer dependencies: npm install sass html-minifier --save-dev
Update your configuration: replace loadStyles: true with inlineStyles: true
Ensure your Node.js version is >=13.2.0 or switch to a different format like cjs.
Install sass as a dev dependency: npm install sass --save-dev
Access data via <%= locals.dataKey %> in your ejs templates.
Install sass: npm install sass --save-dev
Install html-minifier: npm install html-minifier --save-dev
Use default import: import ejs from 'rollup-plugin-ejs'