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, }, ]);