Closed
Description
This will make it possible for packages dependant on graphql
to in turn do the same for their consumers, without encountering babel/babel#7294.
Node.js with --experimental-modules
can run ESM in .mjs files.
Essentially, package.json needs to go from this:
{
"main": "index.js",
"module": "module/index.js"
}
To this:
{
"main": "index",
"module": "index.mjs"
}
Sibling index.js
(CJS) and index.mjs
(ESM) files need to be published. Node.js will load the relevant file, looking up .mjs
before .js
for main
if --experimental-modules
is enabled.
Metadata
Metadata
Assignees
Labels
No labels