From a5433291c9e3851881e6de2035fc2f18db1ededa Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 26 Feb 2024 19:57:29 -0500 Subject: [PATCH 1/2] fix: add `main` entry point Some tools don't play well with only having the `exports` field present. See octokit/core.js#662 --- scripts/build.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 0a71dc79c..52068002b 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -53,8 +53,14 @@ async function main() { { ...pkg, files: ["dist-*/**"], - exports: "./dist-src/index.js", + main: "./dist-src/index.js", types: "./dist-types/index.d.ts", + exports: { + ".": { + import: "./dist-src/index.js", + types: "./dist-types/index.d.ts", + } + }, sideEffects: false, }, null, From 305f03410ff3640628e1a20cefc3d453ee452218 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 26 Feb 2024 20:00:09 -0500 Subject: [PATCH 2/2] style: prettier --- scripts/build.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 52068002b..d7d9614c6 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -59,7 +59,7 @@ async function main() { ".": { import: "./dist-src/index.js", types: "./dist-types/index.d.ts", - } + }, }, sideEffects: false, },