From e762f933baa17ff483fc98fe45ee77b5ff507386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=AEPhilihp=20Busby?= Date: Fri, 5 Jul 2024 22:16:47 +0000 Subject: [PATCH] build: add exports to package (#547) * exports cjs/esm * add module/types to package --- package.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 13ea5a1..95b9fac 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,16 @@ "license": "MIT", "sideEffects": false, "type": "module", - "main": "./dist/index.js", + "main": "./dist/index.cjs", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.cjs", + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + } + }, "scripts": { "build": "tsup", "lint": "eslint .", @@ -17,6 +26,7 @@ }, "files": [ "/dist/", + "package.json", "!/dist/**/__tests__/*.js" ], "keywords": [