Skip to content

Commit

Permalink
Fix mjs type def resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-hemphill authored Mar 19, 2023
1 parent a924911 commit 4341353
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./*": "./*"
},
"scripts": {
"dev": "npm run build -- --watch",
"build": "tsup src/index.ts --dts --format cjs,esm",
"build": "tsup src/index.ts --dts --format cjs,esm && cp dist/index.d.ts dist/index.d.mts",
"prepublishOnly": "npm run build",
"release": "npx bumpp --commit --tag --push && npm publish",
"example:dev": "npm -C examples/spa run dev",
Expand Down

0 comments on commit 4341353

Please sign in to comment.