Skip to content

--experimental-resolve-self and exports sugar #30602

@guybedford

Description

@guybedford

Currently when using the --experimental-resolve-self flag, with the following:

{
  "name": "test",
  "exports": "./test.js"
}

If including a require('test') in the test.js file and running node --experimental-resolve-self pkg/test.js this will throw an error.

It works with "main" and exports subpaths though so may be a sugar-specific or main-specific error case for this flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.good first issueIssues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions