mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
support rn75
This commit is contained in:
@@ -51,9 +51,20 @@ async function runReactNativeBundleCommand(
|
||||
|
||||
fs.emptyDirSync(outputFolder);
|
||||
|
||||
let cliPath = require.resolve('react-native/local-cli/cli.js', {
|
||||
let cliPath;
|
||||
|
||||
try {
|
||||
// rn >= 0.75
|
||||
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
|
||||
paths: [process.cwd()],
|
||||
});
|
||||
} catch (e) {
|
||||
// rn < 0.75
|
||||
cliPath = require.resolve('react-native/local-cli/cli.js', {
|
||||
paths: [process.cwd()],
|
||||
});
|
||||
}
|
||||
|
||||
let usingExpo = false;
|
||||
try {
|
||||
require.resolve('expo-router', {
|
||||
|
Reference in New Issue
Block a user