Skip to content

Exports field of package.json is not supported by module loaders #957

@0c3d7r4

Description

@0c3d7r4

The exports field in package.json allows to define certain inner paths for package resolution, e.g.,

{
 "package":"test",
 "exports":{
  ".": "./index.js",
  "./functions": "./lib/functions.js",
 }
}

Should allow to:

require('test/functions')

Although this works in Node, this does not work in GraalJS. A separate issue is created for ESM module loader which bails on discovering exports altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions