Skip to content

ECMAScript Modules spec doesn't clearly state what to do with multiple extensions #61141

@Scalahansolo

Description

@Scalahansolo

Affected URL(s)

https://nodejs.org/api/esm.html#resolution-algorithm-specification

Description of the problem

While working through a few things with the Typescript team along with the vite / void zero team, I've run into something that I think could be clarified better in the docs about package resolution.

This is related to #60864 along with microsoft/TypeScript#62909 (comment)

What I'm trying to sus out there is... when these wildcard exports are used, should there be any type of "algorithm" or "probing" that should happen at resolution time if the import statement in the given file doesn't define the extension of the file being imported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions