Skip to content

Document legacyMainResolve in the esm loader #43269

@weswigham

Description

@weswigham

Version

website

Platform

website

Subsystem

modules

What steps will reproduce the bug?

https://nodejs.org/api/esm.html#resolution-algorithm says main is resolved as
Return the URL resolution of main in packageURL., but in reality legacyMainResolve is called when there are no exports and the subpath is . and executes a bunch of fallback fs-searching logic, none of which emits deprecation warnings when the target package is not type: module. These conditions and fallbacks should be documented.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

Doc issue.

What do you see instead?

See above.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.loadersIssues and PRs related to ES module loaders

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions