Installation
Last updated
Last updated
To use Glint with v3.24 or higher, you'll need to:
add the @glint/core
, @glint/template
and @glint/environment-ember-loose
packages to your project's devDependencies
add a "glint"
key with appropriate config to your project's tsconfig.json
add import '@glint/environment-ember-loose';
somewhere in your project
Read on for a more detailed explanation of each of these steps.
Note that, by default, Glint will assume you want it to analyze all templates in the codebase that are covered by your tsconfig.json
. To ignore any type errors up front so that you can incrementally migrate your project to typesafe templates, consider using to add to your existing templates that would produce errors.
Finally, ensure you've added the following statement somewhere in your project's source files or ambient type declarations:
Because Glint uses your project-local copy of TypeScript and the packages whose types it augments for use in templates, it requires certain minimum versions of those packages for compatibility.
typescript
4.8.0
@types/ember__component
4.0.8
@glimmer/component
1.1.2
ember-modifier
3.2.7
It's possible to use the 4.x versions of the @types/ember*
packages even if your project is still using an Ember 3.x LTS. Just note that any deprecated APIs you're using that were removed in 4.0 won't be available in the types, and APIs added later will be present in them.
If you are using Glint with TypeScript and Ember, visit the for more information.