Skip to content

Commit f151af4

Browse files
authoredMar 1, 2024··
fix(pkg): add main field (#678)
* 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
1 parent 0551690 commit f151af4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎scripts/build.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ async function main() {
6161
{
6262
...pkg,
6363
files: ["dist-*/**", "bin/**"],
64+
// Tooling currently are having issues with the "exports" field, ex: TypeScript, eslint
65+
// We add a `main` and `types` field to the package.json for the time being
66+
// See https://github.com/octokit/core.js/pulls/662
67+
main: "dist-bundle/index.js",
68+
types: "dist-types/index.d.ts",
6469
exports: {
6570
".": {
6671
types: "./dist-types/index.d.ts",

0 commit comments

Comments
 (0)
Please sign in to comment.