fix: web build issue - #63
Conversation
| import type { TurboModule, CodegenTypes } from 'react-native'; | ||
|
|
||
| const TurboModuleRegistry = | ||
| require('react-native/Libraries/TurboModule/TurboModuleRegistry') as { |
There was a problem hiding this comment.
For the main branch, I recommend avoiding deep imports altogether, as they were deprecated in React Native v0.80 and are no longer supported in v0.87.
https://reactnative.dev/blog/2026/08/11/react-native-0.87#strict-typescript-api-by-default
| @@ -0,0 +1,18 @@ | |||
| import { getNativeModule } from '../native-modules'; | |||
There was a problem hiding this comment.
Firebase is not part of mendix-native, so I don't think this code belongs here.
There was a problem hiding this comment.
This and the others were done to make call sites clean and type safe but I was not aware of its after effects. Let me try moving this to native widgets itself if that fits
| showImagePicker?: unknown; | ||
| } | ||
|
|
||
| export const ImagePickerManager = { |
There was a problem hiding this comment.
ImagePicker is not part of mendix-native, so I don't think this code belongs here.
| }, | ||
| "peerDependencies": { | ||
| "@op-engineering/op-sqlite": "*", | ||
| "@op-engineering/op-sqlite": "15.2.5", |
There was a problem hiding this comment.
We should not lock the version here. It should be the host application's (make-it-native/native-template/appdev-client) responsibility to provide the correct version of op-sqlite.
There was a problem hiding this comment.
You should definitely update this in example/package.json though.
There was a problem hiding this comment.
For some reason even thought Native template pins it to same version mendix native was showing the newer verison in package-lock which lead to crashes while building the app. So I pinned it to the same version as in the native template
| "types": "./lib/typescript/src/firebase-messaging/index.d.ts", | ||
| "default": "./lib/module/firebase-messaging/index.js" | ||
| }, | ||
| "./schedule-exact-alarm": { |
There was a problem hiding this comment.
Why are we routing all these third-party libraries through mendix-native? Upgrading mendix-native in a host application comes at the cost of bumping the nativeBinaryVersion whenever there is a JavaScript-level change, since it is also consumed by the AppDev client. This, in turn, creates a dependency on Studio Pro releases, which then require a corresponding nativeBinaryVersion bump. Each bump reduces the OTA compatibility window. As a result, even upgrades to unrelated third-party dependencies can end up requiring a binary version upgrade, adding unnecessary maintenance overhead for host applications.
There was a problem hiding this comment.
If routing these packages through a JavaScript proxy is the only viable solution, then that proxy should live in the native-widgets repository rather than in mendix-native, to avoid unnecessary impact on make-it-native, native-template, and appdev-client.
| @@ -0,0 +1,7 @@ | |||
| import { getNativeModule } from '../native-modules'; | |||
|
|
|||
| export const NotifeeApiModule = { | |||
There was a problem hiding this comment.
Notifee is not part of mendix-native, so I don't think this code belongs here.
| @@ -0,0 +1,14 @@ | |||
| import { getNativeModule } from '../native-modules'; | |||
|
|
|||
| interface ScheduleEASpec { | |||
There was a problem hiding this comment.
Alarm is not part of mendix-native, so I don't think this code belongs here.
| import type { TurboModule, CodegenTypes } from 'react-native'; | ||
|
|
||
| const TurboModuleRegistry = | ||
| require('react-native/Libraries/TurboModule/TurboModuleRegistry') as { |
There was a problem hiding this comment.
For the main branch, I recommend avoiding deep imports altogether, as they were deprecated in React Native v0.80 and are no longer supported in v0.87.
https://reactnative.dev/blog/2026/08/11/react-native-0.87#strict-typescript-api-by-default
| @@ -0,0 +1,8 @@ | |||
| const TurboModuleRegistry = | |||
| require('react-native/Libraries/TurboModule/TurboModuleRegistry') as { | |||
There was a problem hiding this comment.
For the main branch, I recommend avoiding deep imports altogether, as they were deprecated in React Native v0.80 and are no longer supported in v0.87.
https://reactnative.dev/blog/2026/08/11/react-native-0.87#strict-typescript-api-by-default
No description provided.