Skip to content

Commit 90a59cf

Browse files
committed
support rn75
1 parent ffcc6c9 commit 90a59cf

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/bundle.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,20 @@ async function runReactNativeBundleCommand(
5151

5252
fs.emptyDirSync(outputFolder);
5353

54-
let cliPath = require.resolve('react-native/local-cli/cli.js', {
55-
paths: [process.cwd()],
56-
});
54+
let cliPath;
55+
56+
try {
57+
// rn >= 0.75
58+
cliPath = require.resolve('@react-native-community/cli/build/bin.js', {
59+
paths: [process.cwd()],
60+
});
61+
} catch (e) {
62+
// rn < 0.75
63+
cliPath = require.resolve('react-native/local-cli/cli.js', {
64+
paths: [process.cwd()],
65+
});
66+
}
67+
5768
let usingExpo = false;
5869
try {
5970
require.resolve('expo-router', {

0 commit comments

Comments
 (0)