Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Auto imports not working for modules exported via exports in package.json #46339

Copy link
Copy link
@renke

Description

@renke
Issue body actions

Bug Report

Auto import not working as expected for modules that use the exports field and type: module in package.json.

Relevant PR that introduced exports support: #44501

🕗 Version & Regression Information

Occurs in 4.5.0-dev.20211012 and 4.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 the exports configuration should be valid.

🙂 Expected behavior

Auto import should work for all modules explicitly exported via exports when the exporting package is listed in dependencies (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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Needs InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.