From 64847594b2150bfdce09a7bd7f54ad2f52d6f2b7 Mon Sep 17 00:00:00 2001 From: Martin Porwoll Date: Sun, 15 Feb 2026 00:31:04 +0000 Subject: [PATCH] fix: point exports to TypeScript source for Git dependency consumers Git dependencies don't run prepublishOnly, so dist/ never exists. Point all exports directly to src/*.ts files since Next.js/Turbopack handles TypeScript natively. Co-Authored-By: Claude Opus 4.6 --- package.json | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index b64ceed..8c0f10b 100644 --- a/package.json +++ b/package.json @@ -3,40 +3,38 @@ "version": "1.0.0", "description": "Shared TypeScript types, API client, and block registry for Payload CMS frontends", "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "types": "./src/index.ts", + "import": "./src/index.ts" }, "./types": { - "types": "./dist/types/index.d.ts", - "import": "./dist/types/index.js" + "types": "./src/types/index.ts", + "import": "./src/types/index.ts" }, "./api-client": { - "types": "./dist/api-client/index.d.ts", - "import": "./dist/api-client/index.js" + "types": "./src/api-client/index.ts", + "import": "./src/api-client/index.ts" }, "./blocks": { - "types": "./dist/blocks/registry.d.ts", - "import": "./dist/blocks/registry.js" + "types": "./src/blocks/registry.tsx", + "import": "./src/blocks/registry.tsx" }, "./constants": { - "types": "./dist/constants/index.d.ts", - "import": "./dist/constants/index.js" + "types": "./src/constants/index.ts", + "import": "./src/constants/index.ts" } }, "files": [ - "dist", "src" ], "scripts": { "build": "tsc", "dev": "tsc --watch", "typecheck": "tsc --noEmit", - "extract": "tsx scripts/extract-types.ts", - "prepublishOnly": "pnpm build" + "extract": "tsx scripts/extract-types.ts" }, "keywords": [ "payload-cms",