Skip to content

Commit

Permalink
Add package.json to exports so it can be resolved
Browse files Browse the repository at this point in the history
Many tools attempt to require.resolve package.json, and in the latest
versions of node that is not possible if the package specifies exports.
The solution is to simply add package.json to exports.

Resolves CesiumGS#8992
  • Loading branch information
wallw-teal committed Aug 19, 2020
1 parent 853ed28 commit 9046bd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@
"module": "./Source/Cesium.js",
"types": "./Source/Cesium.d.ts",
"exports": {
"require": "./index.cjs",
"import": "./Source/Cesium.js"
"./package.json": "./package.json",
".": {
"require": "./index.cjs",
"import": "./Source/Cesium.js"
}
},
"type": "module",
"devDependencies": {
Expand Down

0 comments on commit 9046bd2

Please sign in to comment.