Browse Source

Switched to consume react-native-macos from npmjs.orj

Tom Underhill 4 years ago
parent
commit
a7b49dbb19
4 changed files with 13 additions and 5 deletions
  1. 1
    0
      README.md
  2. 6
    0
      metro.config.macos.js
  3. 2
    2
      package.json
  4. 4
    3
      yarn.lock

+ 1
- 0
README.md View File

@@ -20,6 +20,7 @@ _This project is maintained for free by these people using both their free time
20 20
 
21 21
 - [x] iOS
22 22
 - [x] Android
23
+- [x] macOS
23 24
 
24 25
 _Note: Expo support for React Native WebView started with [Expo SDK v33.0.0](https://blog.expo.io/expo-sdk-v33-0-0-is-now-available-52d1c99dfe4c)._
25 26
 

+ 6
- 0
metro.config.macos.js View File

@@ -3,10 +3,16 @@
3 3
  * integration tests during local development or on CI services.
4 4
  */
5 5
 
6
+const path = require('path');
6 7
 const blacklist = require('metro-config/src/defaults/blacklist');
7 8
 
9
+const rnmPath = path.resolve(__dirname, 'node_modules/react-native-macos');
10
+
8 11
 module.exports = {
9 12
   resolver: {
13
+    extraNodeModules: {
14
+      'react-native': rnmPath,
15
+    },
10 16
     platforms: ['macos', 'ios', 'android'],
11 17
     blacklistRE: blacklist([/node_modules\/react-native\/.*/])
12 18
   },

+ 2
- 2
package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "react-native-webview",
3
-  "description": "React Native WebView component for iOS, Android, macOS, and Windows 10 (coming soon)",
3
+  "description": "React Native WebView component for iOS, Android, and macOS",
4 4
   "main": "index.js",
5 5
   "typings": "index.d.ts",
6 6
   "author": "Jamon Holmgren <jamon@infinite.red>",
@@ -60,7 +60,7 @@
60 60
     "metro-react-native-babel-preset": "0.54.1",
61 61
     "react": "16.9.0",
62 62
     "react-native": "0.61.5",
63
-    "react-native-macos": "git://github.com/microsoft/react-native#v0.60.0-microsoft.40",
63
+    "react-native-macos": "0.60.0-microsoft.44",
64 64
     "semantic-release": "15.13.24",
65 65
     "typescript": "3.6.2"
66 66
   },

+ 4
- 3
yarn.lock View File

@@ -7907,9 +7907,10 @@ react-is@^16.8.1, react-is@^16.8.4:
7907 7907
   resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb"
7908 7908
   integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==
7909 7909
 
7910
-"react-native-macos@git://github.com/microsoft/react-native#v0.60.0-microsoft.40":
7911
-  version "0.60.0-microsoft.40"
7912
-  resolved "git://github.com/microsoft/react-native#495ca4dfdfce10dd9d5c3a53fd6afd4f1df9aeb8"
7910
+react-native-macos@0.60.0-microsoft.44:
7911
+  version "0.60.0-microsoft.44"
7912
+  resolved "https://registry.yarnpkg.com/react-native-macos/-/react-native-macos-0.60.0-microsoft.44.tgz#5d3e3edff7e282ea71526c1e167ca57d80ec9aff"
7913
+  integrity sha512-QMb2cMyKAmAg+k2Io7af7SeOne9d1oUnl5Agbjy7YQe6/xmKl3qx0tM+mBvDJPZk204aqhmkvQJY8zpoVOyNsA==
7913 7914
   dependencies:
7914 7915
     "@babel/runtime" "^7.0.0"
7915 7916
     "@react-native-community/cli" "^2.6.0"