diff --git a/package.json b/package.json index a8dc259..9cd2d2a 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,11 @@ "exports": { "./package.json": "./package.json", ".": { - "types": "./dist/src/index.d.ts", + "types": { + "import": "./dist/src/index.d.ts", + "require": "./dist/src/index.d.cts", + "default": "./dist/src/index.d.ts" + }, "require": "./dist/src/index.cjs", "import": "./dist/src/index.js" } @@ -33,7 +37,7 @@ "buf": "buf generate && tsc-esm-fix --src src/authzedapi --ext='.js'", "lint": "./node_modules/.bin/eslint src", "build": "tsc", - "postbuild": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs", + "postbuild": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs && cp dist/src/index.d.ts dist/src/index.d.cts", "prepublish": "yarn build", "build-js-client": "tsc --declaration false --outDir js-dist" },