Make explicit extensions in imports work. #659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #628
See repro repo: https://stackblitz.com/edit/stackblitz-starters-g58nhp?file=examples%2Fts-addon-node16%2Fpackage.json,examples%2Fts-addon-node16%2Fsrc%2Findex.ts
pnpm build
declarations
directoriesUsing the patch from here: #628 (comment)
(where TS would allow)
And the test from here: https://github.com/typed-ember/glint/pull/648/files#diff-a835cb215198fc0a50973a4ae3bf66eac5a4b0bc21293fa29fc70888d663f797
The downside to this approach is "what if" someone has a foo.gts.ts file (probably co-located with a foo.gts.hbs file) -- but like, realistically, this isn't a thing they can use unless they're going half-in on static component references.
Notes:
this feature can't be used because all subpath-imports must start with a
#
to differentiate from packages.not relevant because from a library perspective, our own exports are not referenced except by consumers
Testing locally
The Glint Terminal
yarn
yarn build
glint-monorepo-test-utils
from@glint/core
s package.json's devDependenciesRepro Terminal
pnpm i
pnpm link ~/path/to/this/branch/of/glint
pnpm build
note that after every
pnpm link
, in order to work in the glint repo again, you'll need to re-run yarn, and un-delete theglint-monorepo-test-utils
package.