1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

bugfix: failed run with React Native 0.33

This commit is contained in:
tdzl2003 2016-09-22 06:45:29 +08:00
parent 7bf0fb12de
commit d8cc6cc4c0

View File

@ -365,10 +365,16 @@ export const commands = {
const Config = require(path.resolve('node_modules/react-native/local-cli/util/Config'));
const bundle = require(path.resolve('node_modules/react-native/local-cli/bundle/bundle'));
const defaultConfig =
Config.get(path.resolve('node_modules/react-native/local-cli'),
require(path.resolve('node_modules/react-native/local-cli/default.config'))
);
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'));
} else {
defaultConfig= Config.get(path.resolve('node_modules/react-native/local-cli'), require(path.resolve('node_modules/react-native/local-cli/default.config')));
}
if (bundle.func) {
// React native after 0.31.0