Skip to content

Commit

Permalink
support all common variants of importing/requiring for cjs and esm (
Browse files Browse the repository at this point in the history
  • Loading branch information
mistermoe authored Feb 17, 2023
1 parent 8a490a1 commit c6405eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
"node": ">= 16"
},
"main": "./dist/cjs/src/index.js",
"exports": "./dist/esm/src/index.js",
"module": "./dist/esm/src/index.js",
"exports": {
"import": "./dist/esm/src/index.js",
"require": "./dist/cjs/src/index.js"
},
"browser": {
"./dist/esm/src/index.js": "./dist/bundles/browser.js",
"./dist/cjs/src/index.js": "./dist/bundles/browser.js"
Expand Down Expand Up @@ -127,4 +131,4 @@
"url": "https://github.com/TBD54566975/dwn-sdk-js/issues"
},
"homepage": "https://github.com/TBD54566975/dwn-sdk-js#readme"
}
}

0 comments on commit c6405eb

Please sign in to comment.