Skip to content

Commit

Permalink
Add explicit file for esm type definitions (#42)
Browse files Browse the repository at this point in the history
* Add a separate file for esm types

* Delete the old export entry from original esm support in Commander
  • Loading branch information
shadowspawn authored May 12, 2023
1 parent 575b976 commit 4b47cf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions esm.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Just reexport the types from cjs definition file.
export * from './index.js';
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
},
"files": [
"esm.mjs",
"esm.d.mts",
"index.js",
"index.d.ts"
],
"type": "commonjs",
"exports": {
".": {
"types": "./index.d.ts",
"require": "./index.js",
"import": "./esm.mjs"
},
"./esm.mjs": "./esm.mjs"
}
},
"types": "index.d.ts",
"tsd": {
Expand Down

0 comments on commit 4b47cf7

Please sign in to comment.