From a04c03075bafc8192487c8cc1b837aaf73991760 Mon Sep 17 00:00:00 2001 From: Jonghyeon Ko Date: Mon, 16 Dec 2024 00:23:54 +0900 Subject: [PATCH] feat: esm first (support cjs by exports field of package.json) (#97) --- .changeset/spicy-carrots-attack.md | 5 +++++ packages/package.json | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changeset/spicy-carrots-attack.md diff --git a/.changeset/spicy-carrots-attack.md b/.changeset/spicy-carrots-attack.md new file mode 100644 index 0000000..5785721 --- /dev/null +++ b/.changeset/spicy-carrots-attack.md @@ -0,0 +1,5 @@ +--- +"overlay-kit": patch +--- + +feat: esm first (support cjs by exports field of package.json) diff --git a/packages/package.json b/packages/package.json index 0c2dccb..911ef46 100644 --- a/packages/package.json +++ b/packages/package.json @@ -19,21 +19,22 @@ "email": "been.im@toss.im" }, "sideEffects": false, - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.js", + "types": "dist/index.d.ts", "files": [ "dist" ], "exports": { ".": { "import": { - "types": "./dist/index.d.mts", - "default": "./dist/index.mjs" - }, - "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" } }, "./package.json": "./package.json"