Rollup plugin to generate an HTML file that includes the bundle script. Works with Rollup's output to insert script tags into a template, optionally inline the bundle. Version 0.2.0 targets Node >=8.3. Abandoned – last commit in 2019, no releases since. Simpler than rollup-plugin-html but lacks features like asset injection or multi-page support.
npm install rollup-plugin-generate-htmlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup to generate an HTML file that includes the bundle script via Rollup.
Set output.file to a single file; plugin does not support code splitting or multiple outputs.
Avoid inline with dynamic imports or use with simple IIFE bundles.
Use path.resolve(__dirname, 'template.html') for robust path resolution.
Consider alternatives like @rollup/plugin-html or rollup-plugin-html2.
Ensure the template path is correct and accessible from the current working directory. Use an absolute path.
Use import generateHtml from 'rollup-plugin-generate-html' (default import).
Run npm install -D rollup-plugin-generate-html and ensure package.json includes it.
Set output.file to a single bundle file; this plugin does not support code splitting.