Skip to content

Commit

Permalink
Added exports.default to package.json (#1630)
Browse files Browse the repository at this point in the history
Per NodeJS documentation on the `package.json` `exports` object, there
seems to be a need for a fallback `default` key:
https://nodejs.org/api/packages.html#conditional-exports

Additionally, I'm seeing things like eslint fail to resolve until a
`default` key has been specified. I've not dug any further into why, but
I think _some_ default should be defined until more options should later
be added.
  • Loading branch information
daleyjem authored Oct 20, 2024
1 parent 7aad3d3 commit ff0f3b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"exports": {
".": {
"require": "./lib/application.js",
"import": "./dist/koa.mjs"
"import": "./dist/koa.mjs",
"default": "./dist/koa.mjs"
},
"./*": "./*.js",
"./*.js": "./*.js",
Expand Down

0 comments on commit ff0f3b6

Please sign in to comment.