1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

support rn75

This commit is contained in:
sunnylqm
2024-09-24 21:20:42 +08:00
parent ffcc6c9c96
commit 90a59cfe7b

View File

@@ -51,9 +51,20 @@ async function runReactNativeBundleCommand(
fs.emptyDirSync(outputFolder);
let cliPath = require.resolve('react-native/local-cli/cli.js', {
paths: [process.cwd()],
});
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', {