An Ember CLI addon that compiles Handlebars/HTMLBars templates into JavaScript functions using the Glimmer VM. Current stable version is 7.0.1 (March 2026). It integrates with Ember's build pipeline, supporting AST transforms, custom template compilers, and dependency invalidation. It requires Ember.js v4.12+ and Node.js 20+. Key differentiators: tight integration with Ember CLI, first-party support for addon template compilation, and advanced AST plugin system.
npm install ember-cli-htmlbarsVerified import paths — ran on the pinned version, not inferred.
Shows how to register an AST transform plugin in an Ember addon using ember-cli-htmlbars.
Upgrade Node.js to >=18 and Ember.js to >=4.12.
Upgrade Node.js to >=20.
Upgrade Ember to >=3.27. If on older Ember, stay on v5.x.
Use `plugin: SomeTransform` not `plugin: new SomeTransform()`.
Use `import type { TemplateFactory } from 'ember-cli-htmlbars'` to avoid runtime errors.Use `babel-plugin-ember-template-compilation` or upgrade to new simplified pipeline.
Ensure `this._super.included.apply(this, arguments)` is called before accessing `this.app.registry`.
Run `npm install --save-dev ember-cli-htmlbars` or `yarn add --dev ember-cli-htmlbars`.
Ensure the AST transform returns a valid node or use Glimmer/HTMLBars transformer API.
Use `import HtmlbarsCompiler from 'ember-cli-htmlbars'` instead of `require`.