Skip to content

Commit

Permalink
package.json: use exports instead of module, add types
Browse files Browse the repository at this point in the history
  • Loading branch information
jorrit committed Jan 20, 2023
1 parent 2050658 commit a73f242
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
],
"license": "MIT",
"main": "index.js",
"module": "index.mjs",
"exports": "./index.mjs",
"types": "./index.d.ts",
"peerDependencies": {
"prop-types": "*",
"react": "^16.0.1 || ^17.0.0 || ^18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
exports: 'default',
},
{
file: packageJson.module,
file: packageJson.exports,
format: 'esm',
sourcemap: false,
exports: 'default',
Expand Down

0 comments on commit a73f242

Please sign in to comment.