From a1462d3da31eea44bc6dafe34cf8d999cfcf1bd4 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 15 Apr 2024 19:55:47 -0400 Subject: [PATCH] fix(pkg): add a `default` fallback export See octokit/core.js#665 octokit/core.js#667 --- scripts/build.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index 3363b684..e8f962df 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -61,10 +61,13 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], + types: "./dist-types/index.d.ts", exports: { ".": { types: "./dist-types/index.d.ts", import: "./dist-bundle/index.js", + // Tooling currently are having issues with the "exports" field when there is no "default", ex: TypeScript, eslint + default: "./dist-bundle/index.js", }, }, sideEffects: false,