Browse Source

Slimmed down to one argument

Tom Underhill 5 years ago
parent
commit
70e312ad8a
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      package.json
  2. 1
    1
      react-native.config.js

+ 1
- 1
package.json View File

12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
13
   "scripts": {
13
   "scripts": {
14
     "start": "node node_modules/react-native/local-cli/cli.js start",
14
     "start": "node node_modules/react-native/local-cli/cli.js start",
15
-    "start-macos": "node node_modules/react-native-macos/local-cli/cli.js start --reset-cache --verbose --use-react-native-macos --config=metro.config.macos.js",
15
+    "start-macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
16
     "start:android": "react-native run-android --root example/",
16
     "start:android": "react-native run-android --root example/",
17
     "start:ios": "react-native run-ios --project-path example/ios --scheme RNCWebViewExample",
17
     "start:ios": "react-native run-ios --project-path example/ios --scheme RNCWebViewExample",
18
     "build:e2e:ios": "detox build -c ios",
18
     "build:e2e:ios": "detox build -c ios",

+ 1
- 1
react-native.config.js View File

2
 
2
 
3
 if (process.argv.includes('--use-react-native-macos')) {
3
 if (process.argv.includes('--use-react-native-macos')) {
4
   process.argv = process.argv.filter(arg => arg !== '--use-react-native-macos');
4
   process.argv = process.argv.filter(arg => arg !== '--use-react-native-macos');
5
-
5
+  process.argv.push('--config=metro.config.macos.js');
6
   module.exports = {
6
   module.exports = {
7
     reactNativePath: 'node_modules/react-native-macos',
7
     reactNativePath: 'node_modules/react-native-macos',
8
   };
8
   };