Auto imports not working for modules exported via exports
in package.json
#46339
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
Bug Report
Auto import not working as expected for modules that use the
exports
field andtype: module
in package.json.Relevant PR that introduced
exports
support: #44501🕗 Version & Regression Information
Occurs in
4.5.0-dev.20211012
and4.5.0-beta
.⏯ Playground Link
It's a bit hard to reproduce in the playground, so I've created a repository here https://github.com/renke/typescript-4.5-beta-exports – The README contains some instructions on how to reproduce it. It also describes another bug that was already filed here #46333 so it can probably be ignored.
🙁 Actual behavior
Auto import doesn't work for non-root exported modules (unless they are already imported elsewhere).
Also,
./*
exports can not be imported at all.Running the modules via
node
works, so theexports
configuration should be valid.🙂 Expected behavior
Auto import should work for all modules explicitly exported via
exports
when the exporting package is listed independencies
(as in #38923).Also, import (and auto import) should work for
./*
exports. Unclear if this would lead to performance problems for auto import, but I think this should be supported.The text was updated successfully, but these errors were encountered: