From 0cea280c192568c773490655bbafe4e0cb16e429 Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Wed, 6 Nov 2024 16:57:31 +0200 Subject: [PATCH] fix(react-native): Do not create a tarball locally during build --- packages/react-native/package.json | 16 ++++++++++++++-- packages/react-native/tsup.config.ts | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/react-native/package.json b/packages/react-native/package.json index d5200de380d..4987a3daebe 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -17,11 +17,23 @@ "publishConfig": { "access": "public" }, + "exports": { + ".": { + "import": { + "types": "./dist/client/index.d.mts", + "default": "./dist/client/index.mjs" + }, + "require": { + "types": "./dist/client/index.d.ts", + "default": "./dist/client/index.js" + } + } + }, "scripts": { "build:watch": "tsup --watch", - "build": "tsup && pnpm run check-exports", + "build": "tsup && pnpm run check:exports", "lint": "eslint src", - "check-exports": "attw --pack .", + "check:exports": "attw --pack .", "release:preview": "pnpx pkg-pr-new publish" }, "devDependencies": { diff --git a/packages/react-native/tsup.config.ts b/packages/react-native/tsup.config.ts index 1124f4174ba..fa61f1f13df 100644 --- a/packages/react-native/tsup.config.ts +++ b/packages/react-native/tsup.config.ts @@ -9,5 +9,7 @@ export default defineConfig([ sourcemap: true, clean: true, dts: true, + treeshake: false, + bundle: false, }, ]);