From 6954bf33008b358273caffb3431fcdca510d77d9 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Tue, 5 Dec 2023 17:48:47 -0800 Subject: [PATCH] fix: Reference types per-entrypoint (#364) --- package.json | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 5ec32c74..3fee29e3 100644 --- a/package.json +++ b/package.json @@ -7,19 +7,34 @@ "types": "index.d.ts", "exports": { ".": { - "import": "./index.js", - "require": "./dist/index.cjs", - "types": "./index.d.ts" + "import": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./connect": { - "import": "./connect.js", - "require": "./dist/connect.cjs", - "types": "./connect.d.ts" + "import": { + "types": "./connect.d.ts", + "default": "./connect.js" + }, + "require": { + "types": "./dist/connect.d.cts", + "default": "./dist/connect.cjs" + } }, "./devicedb": { - "import": "./devicedb.js", - "require": "./dist/devicedb.cjs", - "types": "./devicedb.d.ts" + "import": { + "types": "./devicedb.d.ts", + "default": "./devicedb.js" + }, + "require": { + "types": "./dist/devicedb.d.cts", + "default": "./dist/devicedb.cjs" + } } }, "module": "index.js",