From 0fc170ac513ff1ce2c1f1da44f1f7ce62d16e1d6 Mon Sep 17 00:00:00 2001 From: Rexogamer Date: Mon, 15 Jul 2024 22:15:44 +0100 Subject: [PATCH] fix: remove unnecessary reanimated patch turns out this was a config issue on my part :skull: --- ...tive-reanimated-npm-3.12.0-0eaba2f107.patch | 18 ------------------ config/webpack.config.js | 2 ++ 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 .yarn/patches/react-native-reanimated-npm-3.12.0-0eaba2f107.patch diff --git a/.yarn/patches/react-native-reanimated-npm-3.12.0-0eaba2f107.patch b/.yarn/patches/react-native-reanimated-npm-3.12.0-0eaba2f107.patch deleted file mode 100644 index a8358ad8..00000000 --- a/.yarn/patches/react-native-reanimated-npm-3.12.0-0eaba2f107.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/lib/module/reanimated2/PlatformChecker.js b/lib/module/reanimated2/PlatformChecker.js -index 812f2e817d4af2c1695cc9ddd063fc56e6d7d159..a7956708e23285019933923c891055056de21f8e 100644 ---- a/lib/module/reanimated2/PlatformChecker.js -+++ b/lib/module/reanimated2/PlatformChecker.js -@@ -6,7 +6,12 @@ import { Platform } from 'react-native'; - // and this file causes type errors on `global` access. - - export function isJest() { -- return !!process.env.JEST_WORKER_ID; -+ // don't crash if `process` is undefined as this causes problems on web -+ try { -+ return !!process.env.JEST_WORKER_ID; -+ } catch (e) { -+ return false -+ } - } - - // `isChromeDebugger` also returns true in Jest environment, so `isJest()` check should always be performed first diff --git a/config/webpack.config.js b/config/webpack.config.js index adbb412e..b542f726 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -108,5 +108,7 @@ module.exports = { // See: https://github.com/necolas/react-native-web/issues/349 __DEV__: JSON.stringify(true), }), + new webpack.EnvironmentPlugin({ JEST_WORKER_ID: null }), + new webpack.DefinePlugin({ process: { env: {} } }), ], };