From a0f985156ceda63e3ba1c6c9ad1bdf68d1e13af9 Mon Sep 17 00:00:00 2001 From: Thijs Koerselman Date: Wed, 8 Apr 2026 16:10:24 +0200 Subject: [PATCH] fix: correct exports map to match actual tsdown output filenames The tsdown upgrade to v0.21.7 changed the default ESM output extension from .js to .mjs, but the exports field in package.json was not updated to match. This caused ERR_MODULE_NOT_FOUND when importing the package. Fixes #6 --- package.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 88f92c0..d738039 100644 --- a/package.json +++ b/package.json @@ -19,12 +19,18 @@ "url": "git+https://github.com/0x80/get-or-throw.git" }, "type": "module", - "main": "dist/index.cjs", - "types": "dist/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } } }, "publishConfig": {