Typescript autoimport suggestions not working with exports
wildcard
#6844
Labels
wontfix
This will not be worked on
exports
wildcard
#6844
Verify canary release
Link to code that reproduces this issue
npx create-turbo@canary
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo@1.11.2
Describe the Bug
When using wildcards in a monorepo's
package.json
exports
field, which is supported by typescript and compiled properly, there are no typescript autoimport suggestions inside VS Code.Similar issues have been covered here: #331
And some of the constraints have been addressed by TypeScript here: microsoft/TypeScript#53116 (comment)
I'm opening this issue because I think this is a key dev experience improvement, since for suggestions to work right now every component and export to be explicitly declared in the
package.json
, which feels like an anti-pattern and yet another point of friction for fast-paced repositories.As referenced in the TypeScript issue, I believe "internal packages" are not yet supported since they export
.ts
files and not compiled.js
and type defs, but perhaps the wise heads here will be able to offer a solution.Expected Behavior
Since wildcard
exports
inpackage.json
is working fine inturbo
repos both locally and both in deployment, with both compilation and typing, it should also work during development with autoimports and suggestions in the IDE.To Reproduce
This issue is very simple to reproduce:
npx create-turbo@latest
packages/ui
to a wildcard exports:Try to add a
Card
orCode
component inweb/app/page.tsx
and suggestions will no longer work in the editor.Additional context
As mentioned, as far as I understand this is not a feature that is supported by TypeScript at the moment, but I'm not too familiar with
tsconfig
configurations for different types of projects, and usually rely on boilerplate scaffolding.Would appreciate any advice on how to achieve the desired dev flexibility with current limitations of the tooling.
The text was updated successfully, but these errors were encountered: