Skip to content

Commit

Permalink
fix: export module type
Browse files Browse the repository at this point in the history
Support exporting both module and require types.
They are the same right not but might diverge in the future.

PR: #5
  • Loading branch information
jbergstroem authored Jul 17, 2024
1 parent 56566a6 commit 65e2eb6
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,26 @@
"license": "MIT",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
"import": {
"default": "./dist/index.mjs",
"types": "./dist/index.d.mts"
},
"require": {
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
},
"types": "./dist/index.d.ts",
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"dist/index.d.mts",
"dist/index.d.ts",
"dist/index.js",
"dist/index.mjs",
"dist/*.d.ts",
"package.json",
"LICENSE",
"CHANGELOG.md",
"README.md"
"package.json"
],
"scripts": {
"build": "tsup",
Expand Down

0 comments on commit 65e2eb6

Please sign in to comment.