Skip to content

Commit 7db4213

Browse files
authored
Merge pull request reactnativecn#94 from reactnativecn/sunnylqm-patch-2
support 0.42
2 parents 66b535b + c5b3db6 commit 7db4213

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

local-cli/src/bundle.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,17 @@ export const commands = {
382382
let defaultConfig;
383383

384384
if (major >= 0 && minor >= 33) {
385-
defaultConfig= Config.get(
386-
path.resolve('node_modules/react-native/local-cli'),
387-
require(path.resolve('node_modules/react-native/local-cli/default.config')),
388-
path.resolve('node_modules/react-native/packager/rn-cli.config.js'));
385+
if (minor >= 42) {
386+
defaultConfig= Config.get(
387+
path.resolve('node_modules/react-native/local-cli'),
388+
require(path.resolve('node_modules/react-native/local-cli/core/default.config')),
389+
path.resolve('node_modules/react-native/packager/rn-cli.config.js'));
390+
} else {
391+
defaultConfig= Config.get(
392+
path.resolve('node_modules/react-native/local-cli'),
393+
require(path.resolve('node_modules/react-native/local-cli/default.config')),
394+
path.resolve('node_modules/react-native/packager/rn-cli.config.js'));
395+
}
389396
} else {
390397
defaultConfig= Config.get(path.resolve('node_modules/react-native/local-cli'), require(path.resolve('node_modules/react-native/local-cli/default.config')));
391398
}

0 commit comments

Comments
 (0)