From d3fdd6155b08d0f375bb77b921832a1634144e29 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 15 Jan 2023 13:24:53 -0800 Subject: [PATCH] List types separately in each dist type The uglier more correct work around for TypeScript's strange interaction with package.json exports in hybrid modules. Fix: #189 --- package.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 076529e2..090bdacb 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,14 @@ "types": "./dist/cjs/index.d.ts", "exports": { ".": { - "types": "./dist/cjs/index.d.ts", - "import": "./dist/mjs/index.js", - "require": "./dist/cjs/index.js" + "import": { + "default": "./dist/mjs/index.js", + "types": "./dist/mjs/index.d.ts" + }, + "require": { + "default": "./dist/cjs/index.js", + "types": "./dist/cjs/index.d.ts" + } } }, "files": [