Skip to content

Commit

Permalink
fix(types): support node16 and bundler
Browse files Browse the repository at this point in the history
Currently, the TypeScript types for this module only support the
`node10` TypeScript module resolution mode.
Now, `node10`, `node16` (ESM only), and `bundler` all work,
according to https://arethetypeswrong.github.io/

Fixes: #628
Fixes: #633
Co-authored-by: Andrew Shaw Care <54861+andrewshawcare@users.noreply.github.com>
  • Loading branch information
aloisklink and andrewshawcare committed Jan 22, 2024
1 parent e0340e2 commit 5b60cb9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"engines": {
"node": "^14.13 || >=16.0"
},
"exports": "./src/index.js",
"exports": {
".": {
"import": {
"types": "./dist-types/src/index.d.ts",
"default": "./src/index.js"
}
}
},
"types": "./dist-types/src/index.d.ts",
"scripts": {
"prepare": "tsc && vite build",
Expand Down

0 comments on commit 5b60cb9

Please sign in to comment.