From 3469ece7b882c2f30a13ac70549ec4a928df94f4 Mon Sep 17 00:00:00 2001 From: Yevhenii Date: Wed, 9 Sep 2026 20:20:47 +0300 Subject: [PATCH] fix(exports): correct `./components/*` source targets for two non-tsx modules `./components/*` declares `source` and `react-native` as `./src/components/*.tsx`, but `copyComponentProperties` is authored `.ts` and `index` is `.cts`/`.ts`. Export conditions match on key presence rather than target existence, so both subpaths are a hard ERR_MODULE_NOT_FOUND under either condition, with no fallthrough to import/require. `react-native` is live: Expo sets it for iOS and Android. `source` is what react-native-builder-bob's example-app workflow runs on. An exact key beats a pattern regardless of declaration order, so two entries resolve it. `index` takes `.cts` to match what the existing exact `./components` entry already declares. Closes #445 --- package.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/package.json b/package.json index 29c04232..fc462513 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,30 @@ "types": "./dist/typescript/commonjs/src/components/index.d.ts" } }, + "./components/copyComponentProperties": { + "source": "./src/components/copyComponentProperties.ts", + "react-native": "./src/components/copyComponentProperties.ts", + "import": { + "types": "./dist/typescript/module/src/components/copyComponentProperties.d.ts", + "default": "./dist/module/components/copyComponentProperties.js" + }, + "require": { + "types": "./dist/typescript/commonjs/src/components/copyComponentProperties.d.ts", + "default": "./dist/commonjs/components/copyComponentProperties.js" + } + }, + "./components/index": { + "source": "./src/components/index.cts", + "react-native": "./src/components/index.cts", + "import": { + "types": "./dist/typescript/module/src/components/index.d.ts", + "default": "./dist/module/components/index.cjs" + }, + "require": { + "types": "./dist/typescript/commonjs/src/components/index.d.ts", + "default": "./dist/commonjs/components/index.cjs" + } + }, "./components/react-native-safe-area-context": { "source": "./src/components/react-native-safe-area-context.native.tsx", "react-native": "./src/components/react-native-safe-area-context.native.tsx",