From 19836d9abf371cb9635952623a6cfca580f8dfd4 Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Tue, 28 Dec 2021 17:22:45 +0800 Subject: [PATCH] chore: add types to exports field to be compatible with nodenext module resolution (#1522) See [1] for detail, in `nodenext` module resolution it requires a `types` field in `exports` with full filename including extension. [1]: https://github.com/microsoft/TypeScript/issues/46770#issuecomment-966612103 Reference: https://www.typescriptlang.org/tsconfig/#module --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 20fb706c..7240f8fc 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "node": "./build/esm-debug/index.js", "default": "./build/esm/index.js" }, - "require": "./build/cjs/index.js" + "require": "./build/cjs/index.js", + "types": "./build/esm/index.d.ts" } }, "types": "./build/esm/index.d.ts",