From 696f9d361d86acab3680b2457cc7e541416f796d Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 5 Feb 2026 13:00:34 +0100 Subject: [PATCH] feat: Configure package entry points and exports for better module resolution, update build scripts to include templates, and add React peer dependencies. --- packages/mail/package.json | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/mail/package.json b/packages/mail/package.json index 8f8e95b..1b6314c 100644 --- a/packages/mail/package.json +++ b/packages/mail/package.json @@ -7,18 +7,29 @@ "registry": "https://npm.infra.mintel.me" }, "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", "exports": { - ".": "./src/index.ts", - "./templates/*": "./src/templates/*" + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./templates/*": { + "types": "./dist/templates/*.d.ts", + "import": "./dist/templates/*.js" + } }, "scripts": { - "build": "tsup src/index.ts --format esm --dts", - "dev": "tsup src/index.ts --format esm --watch", + "build": "tsup src/index.ts src/templates/*.tsx --format esm --dts --clean", + "dev": "tsup src/index.ts src/templates/*.tsx --format esm --watch --dts", "lint": "eslint src", "test": "vitest run" }, "dependencies": { - "@react-email/components": "^0.0.33", + "@react-email/components": "^0.0.33" + }, + "peerDependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" },