mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 01:41:37 +08:00
Swap React Native CLI paths based on version compatibility in runReactNativeBundleCommand function
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update-cli",
|
||||
"version": "1.42.0",
|
||||
"version": "1.42.1",
|
||||
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
@@ -102,13 +102,13 @@ async function runReactNativeBundleCommand({
|
||||
|
||||
const getRnCli = () => {
|
||||
try {
|
||||
// rn >= 0.75
|
||||
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
|
||||
// rn < 0.75
|
||||
cliPath = require.resolve('react-native/local-cli/cli.js', {
|
||||
paths: [process.cwd()],
|
||||
});
|
||||
} catch (e) {
|
||||
// rn < 0.75
|
||||
cliPath = require.resolve('react-native/local-cli/cli.js', {
|
||||
// rn >= 0.75
|
||||
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
|
||||
paths: [process.cwd()],
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user