Skip to content

Commit

Permalink
Manually export package.json to support introspective tools
Browse files Browse the repository at this point in the history
Tools such as Components.js and react-native require introspection of
the package.json file. Since the new export syntax does not imply
package.json resolution yet (nodejs/node#33460), this has to be exported
explicitly. Ideally, this would be something that is done implicitly by
Node.js, but this is something that is still being discussed at
nodejs/node#33460. So until then, this has to be added explictly to
avoid breaking other tooling.

Related to uuidjs/uuid#444
  • Loading branch information
rubensworks authored and RubenVerborgh committed Nov 3, 2021
1 parent 0244961 commit dc095ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -6,8 +6,11 @@
"type": "module",
"main": "dist/asynciterator.cjs",
"exports": {
"import": "./dist/asynciterator.js",
"require": "./dist/asynciterator.cjs"
"./package.json": "./package.json",
".": {
"import": "./dist/asynciterator.js",
"require": "./dist/asynciterator.cjs"
}
},
"module": "./dist/asynciterator.js",
"types": "./dist/asynciterator.d.ts",
Expand Down

0 comments on commit dc095ed

Please sign in to comment.