Skip to content

Path completions with wildcard "exports" drop necessary file extensions #56929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrewbranch opened this issue Jan 2, 2024 · 1 comment · Fixed by #57312
Closed

Path completions with wildcard "exports" drop necessary file extensions #56929

andrewbranch opened this issue Jan 2, 2024 · 1 comment · Fixed by #57312
Assignees
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor Fix Available A PR has been opened for this issue

Comments

@andrewbranch
Copy link
Member

@repo/ui/bar and @repo/ui/card are not valid module specifiers via that wildcard exports. The result of a wildcard * substitution is a file lookup, so file extension adding and index directory lookups don't occur. So, the correct module specifiers would be @repo/ui/card.tsx and @repo/ui/bar.js.

Originally posted by @andrewbranch in #56412 (comment)

@andrewbranch andrewbranch self-assigned this Jan 2, 2024
@andrewbranch andrewbranch added Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor labels Jan 2, 2024
@andrewbranch andrewbranch added this to the TypeScript 5.4.0 milestone Jan 2, 2024
@andrewbranch andrewbranch added the Help Wanted You can do this label Jan 2, 2024
@andrewbranch
Copy link
Member Author

From the same conversation:

Subpaths in exports also seem to break IntelliSense (auto-complete of RHS import paths does not work):

"exports": {
    "./foo/bar": "./src/bar.js",
  }

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants