react-native-update-cli 1.27.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bundle.js +3 -1
- package/package.json +1 -1
- package/src/bundle.js +4 -4
package/lib/bundle.js
CHANGED
|
@@ -68,6 +68,7 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
|
|
|
68
68
|
let cliPath = require.resolve('react-native/local-cli/cli.js', {
|
|
69
69
|
paths: [process.cwd()]
|
|
70
70
|
});
|
|
71
|
+
let usingExpo = false;
|
|
71
72
|
try {
|
|
72
73
|
require.resolve('expo-router', {
|
|
73
74
|
paths: [process.cwd()]
|
|
@@ -78,8 +79,9 @@ async function runReactNativeBundleCommand(bundleName, development, entryFile, o
|
|
|
78
79
|
cliPath = require.resolve('@expo/cli', {
|
|
79
80
|
paths: [process.cwd()]
|
|
80
81
|
});
|
|
82
|
+
usingExpo = true;
|
|
81
83
|
} catch (e) {}
|
|
82
|
-
const bundleCommand =
|
|
84
|
+
const bundleCommand = usingExpo ? 'export:embed' : 'bundle';
|
|
83
85
|
|
|
84
86
|
Array.prototype.push.apply(reactNativeBundleArgs, [cliPath, bundleCommand, '--assets-dest', outputFolder, '--bundle-output', _path2.default.join(outputFolder, bundleName), '--dev', development, '--entry-file', entryFile, '--platform', platform, '--reset-cache']);
|
|
85
87
|
|
package/package.json
CHANGED
package/src/bundle.js
CHANGED
|
@@ -54,6 +54,7 @@ async function runReactNativeBundleCommand(
|
|
|
54
54
|
let cliPath = require.resolve('react-native/local-cli/cli.js', {
|
|
55
55
|
paths: [process.cwd()],
|
|
56
56
|
});
|
|
57
|
+
let usingExpo = false;
|
|
57
58
|
try {
|
|
58
59
|
require.resolve('expo-router', {
|
|
59
60
|
paths: [process.cwd()],
|
|
@@ -64,10 +65,9 @@ async function runReactNativeBundleCommand(
|
|
|
64
65
|
cliPath = require.resolve('@expo/cli', {
|
|
65
66
|
paths: [process.cwd()],
|
|
66
67
|
});
|
|
68
|
+
usingExpo = true;
|
|
67
69
|
} catch (e) {}
|
|
68
|
-
const bundleCommand =
|
|
69
|
-
? 'export:embed'
|
|
70
|
-
: 'bundle';
|
|
70
|
+
const bundleCommand = usingExpo ? 'export:embed' : 'bundle';
|
|
71
71
|
|
|
72
72
|
Array.prototype.push.apply(reactNativeBundleArgs, [
|
|
73
73
|
cliPath,
|
|
@@ -204,7 +204,7 @@ async function compileHermesByteCode(
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
const hermesCommand = `${hermesPath}/hermesc`;
|
|
207
|
-
|
|
207
|
+
|
|
208
208
|
const args = [
|
|
209
209
|
'-emit-binary',
|
|
210
210
|
'-out',
|