Files
flipper/desktop/patches/metro+0.66.0.patch
Anton Nikolaev 22974130c8 Fix metro patches after updating metro version
Summary: There was a warning in console on `yarn install` saying that patches should be reapplied because "metro" and "metro-runtime" updated, so I called `patch-package metro metro-runtime` to re-apply patches.

Reviewed By: passy

Differential Revision: D28312817

fbshipit-source-id: 5e8bcee2d75a50099e71ad9c2812c14ee2c7ce9c
2021-05-12 07:49:13 -07:00

14 lines
669 B
Diff

diff --git a/node_modules/metro/src/lib/getPreludeCode.js b/node_modules/metro/src/lib/getPreludeCode.js
index f73c6ec..fc313ec 100644
--- a/node_modules/metro/src/lib/getPreludeCode.js
+++ b/node_modules/metro/src/lib/getPreludeCode.js
@@ -14,7 +14,7 @@ function getPreludeCode({ extraVars, isDev, globalPrefix }) {
"__BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now()",
`__DEV__=${String(isDev)}`,
...formatExtraVars(extraVars),
- "process=this.process||{}",
+ "process=process||this.process||global.process||{}",
`__METRO_GLOBAL_PREFIX__='${globalPrefix}'`
];
return `var ${vars.join(",")};${processEnv(