A Rollup plugin that allows importing HTML files as template strings. Version 1.0.10 is the latest stable release; the package has not seen updates since 2018. It differentiates from other HTML handling plugins by focusing purely on importing raw HTML content without transformation, for use in templating engines or string manipulation. Suitable for projects that need to embed HTML templates directly into JavaScript bundles. No active maintenance or known issues.
npm install rollup-plugin-templateVerified import paths — ran on the pinned version, not inferred.
Configures Rollup to import HTML files as template strings using the glob pattern 'src/templates/**/*.html'.
Ensure your HTML files are minified before import or use an additional plugin like rollup-plugin-html-minifier.
Use a single string glob for include; for multiple patterns, use a brace expansion or combine with rollup's plugin array.
Run 'npm install --save-dev rollup-plugin-template' to install it.
Change import to: import template from 'rollup-plugin-template'
Change include option to a single glob string, e.g., 'src/templates/*.html'