ember-tsc doesn't work well in a monorepo
[Here](https://github.com/bendemboski/ember-tsc-deps) is a reproduction -- a v2 addon inside a monorepo.
The README explains things in detail, but it looks like the type augmentation in `integration-declarations.d.ts` isn't working because typescript can't resolve the packages (`@glimmer/component`, and others).
Moving the `@glint/*` dependencies to the `package.json` in the root of the monorepo does _not_ fix the issue.
Overriding `@glint/ember-tsc` to force it to declare a `peerDependency` on `@glimmer/component` _does_ fix the issue.
Adding `@glimmer/component` as a dependency in the `package.json` in the root of the monorepo _does_ fix the issue.
So it seems that we either need to declare all the augmented module packages as `peerDependencies`, update the documentation to advise monorepo users to install all the augmented module packages at the root of their monorepo, or re-visit the augmentation architecture?
关闭于 2026-01-04 3 条评论