diff --git a/package.json b/package.json index c352cad..a0e275f 100644 --- a/package.json +++ b/package.json @@ -19,19 +19,9 @@ "url": "git+https://github.com/0x80/get-or-throw.git" }, "type": "module", - "main": "./dist/index.cjs", - "types": "./dist/index.d.cts", "exports": { - ".": { - "import": { - "types": "./dist/index.d.mts", - "default": "./dist/index.mjs" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - } + ".": "./dist/index.mjs", + "./package.json": "./package.json" }, "publishConfig": { "access": "public" diff --git a/tsdown.config.ts b/tsdown.config.ts index 5dd5215..4fcfbe2 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -2,9 +2,10 @@ import { defineConfig } from "tsdown"; export default defineConfig({ entry: { index: "src/index.ts" }, - format: ["esm", "cjs"], - target: "node20", + format: ["esm"], + target: "node22", sourcemap: true, dts: true, clean: true, + exports: true, });