@magicred-1/react-native-lxmf 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/LxmfModule.js +10 -2
- package/package.json +1 -1
package/build/LxmfModule.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LxmfModuleNative = exports.LxmfModule = exports.isLxmfNativeAvailable = void 0;
|
|
4
|
-
|
|
4
|
+
// Lazy require — safe in Node.js config-plugin context (no React Native runtime)
|
|
5
|
+
let requireOptionalNativeModule = () => null;
|
|
6
|
+
try {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
8
|
+
requireOptionalNativeModule = require('expo-modules-core').requireOptionalNativeModule;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
// Node.js / config-plugin evaluation context — native modules not available
|
|
12
|
+
}
|
|
5
13
|
const MISSING_NATIVE_MESSAGE = "Cannot find native module 'LxmfModule'. Use an Expo development build (not Expo Go) and rebuild native apps after local module changes.";
|
|
6
|
-
const LxmfModuleNative =
|
|
14
|
+
const LxmfModuleNative = requireOptionalNativeModule('LxmfModule');
|
|
7
15
|
exports.LxmfModuleNative = LxmfModuleNative;
|
|
8
16
|
exports.isLxmfNativeAvailable = !!LxmfModuleNative;
|
|
9
17
|
const throwMissingNative = () => {
|