From c5b3db6c48ac0867358f3f680f60fcc7d0a21325 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Tue, 14 Mar 2017 10:24:02 +0800 Subject: [PATCH] support 0.42 --- local-cli/src/bundle.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/local-cli/src/bundle.js b/local-cli/src/bundle.js index 6768c4d..ddac802 100644 --- a/local-cli/src/bundle.js +++ b/local-cli/src/bundle.js @@ -382,10 +382,17 @@ export const commands = { let defaultConfig; if (major >= 0 && minor >= 33) { - defaultConfig= Config.get( - path.resolve('node_modules/react-native/local-cli'), - require(path.resolve('node_modules/react-native/local-cli/default.config')), - path.resolve('node_modules/react-native/packager/rn-cli.config.js')); + if (minor >= 42) { + defaultConfig= Config.get( + path.resolve('node_modules/react-native/local-cli'), + require(path.resolve('node_modules/react-native/local-cli/core/default.config')), + path.resolve('node_modules/react-native/packager/rn-cli.config.js')); + } else { + defaultConfig= Config.get( + path.resolve('node_modules/react-native/local-cli'), + require(path.resolve('node_modules/react-native/local-cli/default.config')), + path.resolve('node_modules/react-native/packager/rn-cli.config.js')); + } } else { defaultConfig= Config.get(path.resolve('node_modules/react-native/local-cli'), require(path.resolve('node_modules/react-native/local-cli/default.config'))); }