Skip to content

Commit

Permalink
fix(pkg): add main field (#678)
Browse files Browse the repository at this point in the history
* fix(pkg): add `main` field

Some tools don't play well with only having the `exports` field present.
See octokit/core.js#662

* maint: add comment
  • Loading branch information
wolfy1339 authored Mar 1, 2024
1 parent 0551690 commit f151af4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ async function main() {
{
...pkg,
files: ["dist-*/**", "bin/**"],
// Tooling currently are having issues with the "exports" field, ex: TypeScript, eslint
// We add a `main` and `types` field to the package.json for the time being
// See https://github.com/octokit/core.js/pulls/662
main: "dist-bundle/index.js",
types: "dist-types/index.d.ts",
exports: {
".": {
types: "./dist-types/index.d.ts",
Expand Down

0 comments on commit f151af4

Please sign in to comment.