From 234093313848b1d24c356d5f0725a9762d013a2a Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Wed, 22 Feb 2023 23:19:18 +1300 Subject: [PATCH] build: fix types for cjs --- package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7e90d7a3..299a9a1b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,10 @@ "type": "module", "exports": { ".": { - "types": "./lib/index.d.ts", + "types": { + "import": "./lib/index.d.ts", + "require": "./lib/index.d.cts" + }, "import": "./lib/index.js", "require": "./lib/index.cjs" } @@ -24,7 +27,7 @@ "README.md" ], "scripts": { - "build": "tsup src/index.ts --clean --format cjs,esm --outDir lib --dts", + "build": "tsup src/index.ts --clean --format cjs,esm --outDir lib --dts && cp lib/index.d.ts lib/index.d.cts", "docs": "typedoc", "docs:serve": "http-serve docs/generated", "format": "prettier \"**/*\" --ignore-unknown",