From 9de1ef853c6675ee382ef1cd1f1967c0b1e6dcda Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:41:17 -0400 Subject: [PATCH] fix(pkg): add `default` fallback and `types` export (#565) --- scripts/build.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 0192d75f..3c8adc87 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -65,12 +65,15 @@ async function main() { { ...pkg, files: ["dist-*/**", "bin/**"], - main: "./dist-bundle/index.js", types: "./dist-types/index.d.ts", exports: { ".": { types: "./dist-types/index.d.ts", import: "./dist-bundle/index.js", + default: "./dist-bundle/index.js", + }, + "./types": { + types: "./dist-types/types.d.ts", }, }, sideEffects: false,