Skip to content

Commit

Permalink
[webview] patch before react-native-webview adds support for 0.73 (ex…
Browse files Browse the repository at this point in the history
…po#25487)

# Why

NCl is currently broken on main and running `yarn start` will result in
the following error


![image](https://github.com/expo/expo/assets/11707729/9d9ea198-aad8-4cfd-bcc2-5b8831c2a0f0)


# How

Patch react-native-webview based on
react-native-webview/react-native-webview#3209
while a new version is not released

# Test Plan

NCL should build as expected 

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [ ] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [ ] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
  • Loading branch information
gabrieldonadel authored Nov 20, 2023
1 parent aace03f commit bcf48ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"setup:docs": "./scripts/download-dependencies.sh",
"setup:native": "./scripts/download-dependencies.sh && ./scripts/setup-react-android.sh",
"postinstall": "yarn-deduplicate && expo-yarn-workspaces check-workspace-dependencies && ([ ! -f node_modules/@react-native/dev-middleware/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/@react-native+dev-middleware+0.73.4.patch || true) && ([ ! -f node_modules/react-native-gesture-handler/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/react-native-gesture-handler+2.12.0.patch || true) && ([ ! -f node_modules/react-native-reanimated/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/react-native-reanimated+3.6.0-nightly-20231031-c56d44fd9.patch || true) && yarn workspace @expo/cli prepare",
"postinstall": "yarn-deduplicate && expo-yarn-workspaces check-workspace-dependencies && ([ ! -f node_modules/@react-native/dev-middleware/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/@react-native+dev-middleware+0.73.4.patch || true) && ([ ! -f node_modules/react-native-gesture-handler/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/react-native-gesture-handler+2.12.0.patch || true) && ([ ! -f node_modules/react-native-reanimated/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/react-native-reanimated+3.6.0-nightly-20231031-c56d44fd9.patch || true) && ([ ! -f node_modules/react-native-webview/package.json.orig ] && patch -d node_modules -p2 -f --backup < patches/react-native-webview+13.6.2.patch || true) && yarn workspace @expo/cli prepare",
"lint": "eslint .",
"tsc": "echo 'You are trying to run \"tsc\" in the workspace root. Run it from an individual package instead.' && exit 1"
},
Expand Down
12 changes: 12 additions & 0 deletions patches/react-native-webview+13.6.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/node_modules/react-native-webview/package.json b/node_modules/react-native-webview/package.json
index 3283ef5..a4ccab1 100644
--- a/node_modules/react-native-webview/package.json
+++ b/node_modules/react-native-webview/package.json
@@ -3,6 +3,7 @@
"description": "React Native WebView component for iOS, Android, macOS, and Windows",
"main": "index.js",
"main-internal": "src/index.ts",
+ "react-native": "src/index.ts",
"typings": "index.d.ts",
"author": "Jamon Holmgren <jamon@infinite.red>",
"contributors": [

0 comments on commit bcf48ba

Please sign in to comment.