mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
fix expo cli on windows
This commit is contained in:
@@ -54,6 +54,7 @@ async function runReactNativeBundleCommand(
|
|||||||
let cliPath = require.resolve('react-native/local-cli/cli.js', {
|
let cliPath = require.resolve('react-native/local-cli/cli.js', {
|
||||||
paths: [process.cwd()],
|
paths: [process.cwd()],
|
||||||
});
|
});
|
||||||
|
let usingExpo = false;
|
||||||
try {
|
try {
|
||||||
require.resolve('expo-router', {
|
require.resolve('expo-router', {
|
||||||
paths: [process.cwd()],
|
paths: [process.cwd()],
|
||||||
@@ -64,10 +65,9 @@ async function runReactNativeBundleCommand(
|
|||||||
cliPath = require.resolve('@expo/cli', {
|
cliPath = require.resolve('@expo/cli', {
|
||||||
paths: [process.cwd()],
|
paths: [process.cwd()],
|
||||||
});
|
});
|
||||||
|
usingExpo = true;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
const bundleCommand = cliPath.includes('@expo/cli')
|
const bundleCommand = usingExpo ? 'export:embed' : 'bundle';
|
||||||
? 'export:embed'
|
|
||||||
: 'bundle';
|
|
||||||
|
|
||||||
Array.prototype.push.apply(reactNativeBundleArgs, [
|
Array.prototype.push.apply(reactNativeBundleArgs, [
|
||||||
cliPath,
|
cliPath,
|
||||||
@@ -204,7 +204,7 @@ async function compileHermesByteCode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hermesCommand = `${hermesPath}/hermesc`;
|
const hermesCommand = `${hermesPath}/hermesc`;
|
||||||
|
|
||||||
const args = [
|
const args = [
|
||||||
'-emit-binary',
|
'-emit-binary',
|
||||||
'-out',
|
'-out',
|
||||||
|
Reference in New Issue
Block a user