A minimal Rollup plugin for bundling Handlebars templates. Version 1.2.6 is the latest stable release, last updated in 2020. It compiles .hbs (or custom extension) templates into precompiled JavaScript functions, integrating with Handlebars runtime. Compared to other Handlebars Rollup plugins like rollup-plugin-handlebars-plus, this package offers a simpler API, sourcemap support, partial detection based on filename prefix, and whitespace optimization. It requires Handlebars, Rollup >=0.62.0, and rollup-pluginutils as peer dependencies. Note that the plugin has not been updated for Rollup 2+/3+ and may be incompatible with modern Rollup versions; consider using @rollup/plugin-handlebars instead.
npm install rollup-plugin-hbsVerified import paths — ran on the pinned version, not inferred.
Configures Rollup to compile Handlebars templates, importing a template and rendering it with data.
Migrate to @rollup/plugin-handlebars or rollup-plugin-handlebars-plus
Use an older version of Rollup (0.x) or switch to a maintained plugin
Ensure partials are imported explicitly or adjust isPartial logic
Disable sourcemaps or use alternatives
Not directly fixable; migrate to a plugin that uses modern Rollup APIs
npm install rollup-plugin-hbs --save-dev
Use 'import hbs from 'rollup-plugin-hbs'' in an ESM context
Ensure rollup-plugin-hbs is added to plugins array and templateExtension matches file extension
npm install handlebars