From f1386b70ec143acb0257b1549ca2b1bc02c342f5 Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Thu, 1 Jun 2023 14:58:15 +0200 Subject: [PATCH] refactor: exports for types and package.json To ensure that `package.json` is qccessible, it has to be exported. See https://github.com/nodejs/node/issues/33460 For the same reason, we now export TypeScript types. --- package.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f154971..79154ed 100644 --- a/package.json +++ b/package.json @@ -24,14 +24,17 @@ "node": "^14.18.0 || >=16.0.0" }, "type": "module", - "main": "./dist/index.cjs", - "module": "./dist/index.js", - "es2015": "./dist/index.js", "types": "./dist/index.d.ts", + "module": "./dist/index.js", + "main": "./dist/index.cjs", "exports": { - "module": "./dist/index.js", - "require": "./dist/index.cjs", - "default": "./dist/index.js" + "./package.json": "./package.json", + ".": { + "types": "./dist/index.d.ts", + "module": "./dist/index.js", + "require": "./dist/index.cjs", + "default": "./dist/index.js" + } }, "imports": { "#dev": {