@codemoreira/esad 2.0.1-28 → 2.0.1-29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemoreira/esad",
3
- "version": "2.0.1-28",
3
+ "version": "2.0.1-29",
4
4
  "description": "Easy Super App Development - Zero-Config CLI and DevTools for React Native Module Federation",
5
5
  "main": "src/plugin/index.js",
6
6
  "types": "./src/plugin/index.d.ts",
@@ -2,17 +2,16 @@
2
2
  * ESAD Runtime Environment Shim
3
3
  * Injected at the very beginning of the bundle to prevent "TypeError: right operand of 'in' is not an object"
4
4
  */
5
- if (typeof process === 'undefined') {
6
- // Use globalThis for modern JS environments (Hermes/V8)
7
- const globalObj = typeof globalThis !== 'undefined' ? globalThis : (typeof global !== 'undefined' ? global : {});
8
- globalObj.process = { env: {} };
9
- } else if (!process.env) {
10
- process.env = {};
5
+ var g = typeof globalThis !== 'undefined' ? globalThis : (typeof global !== 'undefined' ? global : this);
6
+ if (!g['process']) {
7
+ g['process'] = {};
11
8
  }
9
+ if (!g['process']['env']) {
10
+ g['process']['env'] = {};
11
+ }
12
+
13
+ g['process']['env']['EXPO_OS'] = '__EXPO_OS__';
14
+ g['process']['env']['NODE_ENV'] = '__NODE_ENV__';
15
+ g['process']['env']['REPACK_PLATFORM'] = '__REPACK_PLATFORM__';
12
16
 
13
- // Prevent DefinePlugin from replacing the left-hand side by using an intermediate variable and brackets
14
- const e = process.env;
15
- e['EXPO_OS'] = '__EXPO_OS__';
16
- e['NODE_ENV'] = '__NODE_ENV__';
17
- e['REPACK_PLATFORM'] = '__REPACK_PLATFORM__';
18
17