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 37ec970..65a6a0a 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"