From 2e12c98e996333d9b8e779b4721a61a643acf0dd Mon Sep 17 00:00:00 2001 From: Oliver Lazoroski Date: Mon, 17 Aug 2026 10:12:28 +0200 Subject: [PATCH] fix: order "types" first in package.json exports Export conditions are matched top-to-bottom, first match wins. With "import" and "require" listed before "types", the types condition was unreachable, so consumers resolving through "exports" (moduleResolution node16/bundler) never picked up the declarations and esbuild warned about it. The top-level "types" field is kept as the legacy fallback. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e1009c6..65d5d3a 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "", "exports": { ".": { + "types": "./dist/index.d.ts", "import": "./dist/index.es.mjs", - "require": "./dist/index.cjs.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.cjs.js" } }, "main": "dist/index.cjs.js",