Registry / web-framework / rollup-plugin-glimmer-template-tag

rollup-plugin-glimmer-template-tag

JSON →
library0.4.1jsnpmunverified

A Rollup plugin for compiling `<template>` tags in `.gjs` and `.gts` files used by Ember.js v2 addons. Version 0.4.1 requires Node 16+ and Rollup 3+. It is ESM-only and must be paired with Babel's `ember-template-imports` plugin. Key differentiator: it enables the new Ember `<template>` tag syntax in build pipelines, handling both JavaScript and TypeScript via separate transforms with `rollup-plugin-ts`.

npm install rollup-plugin-glimmer-template-tag
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-GLIM
R
rollup-plugin-glimmer-template-tag
web-frameworkjavascriptv0.4.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

glimmerTemplateTag
import { glimmerTemplateTag } from 'rollup-plugin-glimmer-template-tag'
const { glimmerTemplateTag } = require('rollup-plugin-glimmer-template-tag')
Package is ESM-only; CommonJS require will throw. Use ESM imports.
default
import glimmerTemplateTag from 'rollup-plugin-glimmer-template-tag'
import { glimmerTemplateTag } from 'rollup-plugin-glimmer-template-tag'
Default export is the same as named export; both work. Named export is more explicit.
glimmerTemplateTag
import { glimmerTemplateTag } from 'rollup-plugin-glimmer-template-tag'
TypeScript users: import the named symbol; no separate type import needed.

Shows basic Rollup configuration to add `<template>` support for gjs/gts files.

// rollup.config.mjs import { glimmerTemplateTag } from 'rollup-plugin-glimmer-template-tag'; export default { plugins: [ glimmerTemplateTag(), // ... other plugins ] };
Debug
Known issues
breakingESM-only: CommonJS require will fail
fix
Convert config to ESM (.mjs) or use dynamic import().
affects: >=0.0.0
gotchaMust add Babel plugin 'ember-template-imports/src/babel-plugin' in babel.config.js
fix
Add the plugin to your Babel configuration as shown in the README.
affects: >=0.0.0
gotchaWith TypeScript, need to set transpileOnly: true in rollup-plugin-ts
fix
Set typescript({ transpiler: 'babel', transpileOnly: true }) in rollup config.
affects: >=0.0.0
gotchaType errors from <template> are copied into generated .d.ts files, causing downstream errors
fix
Run type-checking separately via glint; ensure source files have no type errors.
affects: >=0.0.0
deprecatedNode 16 EOL; future versions may drop support
fix
Upgrade to Node 18 or 20.
affects: <=0.4.1
Errors
Common errors & fixes
require() of ES Module not supported
Using CommonJS require with ESM-only package
fix
Change to import { glimmerTemplateTag } from 'rollup-plugin-glimmer-template-tag' in .mjs file.
Template tag not transformed: unexpected token '<'
Missing Babel plugin 'ember-template-imports'
fix
Add 'ember-template-imports/src/babel-plugin' to Babel plugins list.
ts(2307) Cannot find module '...' or its corresponding type declarations.
TypeScript declaration errors from template not being transpiled yet
fix
Set transpileOnly: true in rollup-plugin-ts configuration.
Upgrade
Version history
0.4.1latest on npm
Audit
Dependencies
@babel/corerequiredPeer dependency for Babel transform of `<template>` tags
ember-sourcerequiredPeer dependency for Ember runtime support
ember-template-importsrequiredBabel plugin that transforms `<template>` into valid JavaScript/TypeScript
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-glimmer-template-tag — npm install rollup-plugin-glimmer-template-tag · libregistry