bugfix for 0.45+
This commit is contained in:
parent
c80b4e1ede
commit
4b7ff42acf
@ -102,7 +102,7 @@
|
||||
"hasValue": true
|
||||
},
|
||||
"entryFile": {
|
||||
"default": "index.${platform}.js",
|
||||
"default": "",
|
||||
"hasValue": true
|
||||
},
|
||||
"intermediaDir": {
|
||||
|
@ -346,7 +346,7 @@ export const commands = {
|
||||
bundle: async function({options}){
|
||||
const platform = checkPlatform(options.platform || await question('Platform(ios/android):'));
|
||||
|
||||
const {
|
||||
let {
|
||||
entryFile,
|
||||
intermediaDir,
|
||||
output,
|
||||
@ -385,22 +385,32 @@ export const commands = {
|
||||
const bundle = require(path.resolve('node_modules/react-native/local-cli/bundle/bundle'));
|
||||
let defaultConfig;
|
||||
|
||||
if (major >= 0 && minor >= 33) {
|
||||
if (major === 0) {
|
||||
if (minor >= 49) {
|
||||
entryFile = entryFile || `index.js`;
|
||||
} else {
|
||||
entryFile = entryFile || `index.${platform}.js`;
|
||||
}
|
||||
}
|
||||
|
||||
if (major === 0) {
|
||||
if (minor >= 45) {
|
||||
defaultConfig = Config.find(path.resolve('.'));
|
||||
defaultConfig = Config.findOptional(path.resolve('.'));
|
||||
} else 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 {
|
||||
} else if (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')));
|
||||
}
|
||||
} else {
|
||||
defaultConfig= Config.get(path.resolve('node_modules/react-native/local-cli'), require(path.resolve('node_modules/react-native/local-cli/default.config')));
|
||||
defaultConfig = Config.findOptional(path.resolve('.'));
|
||||
}
|
||||
|
||||
if (bundle.func) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.6",
|
||||
"description": "react-native hot update",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
|
15
yarn.lock
15
yarn.lock
@ -108,10 +108,6 @@ ast-types@0.8.12:
|
||||
version "0.8.12"
|
||||
resolved "http://registry.npm.taobao.org/ast-types/download/ast-types-0.8.12.tgz#a0d90e4351bb887716c83fd637ebf818af4adfcc"
|
||||
|
||||
ast-types@0.8.15:
|
||||
version "0.8.15"
|
||||
resolved "http://registry.npm.taobao.org/ast-types/download/ast-types-0.8.15.tgz#8eef0827f04dff0ec8857ba925abe3fea6194e52"
|
||||
|
||||
ast-types@0.9.5:
|
||||
version "0.9.5"
|
||||
resolved "http://registry.npm.taobao.org/ast-types/download/ast-types-0.9.5.tgz#1a660a09945dbceb1f9c9cbb715002617424e04a"
|
||||
@ -1872,7 +1868,7 @@ readdirp@^2.0.0:
|
||||
readable-stream "^2.0.2"
|
||||
set-immediate-shim "^1.0.1"
|
||||
|
||||
recast@0.10.33:
|
||||
recast@0.10.33, recast@^0.10.10:
|
||||
version "0.10.33"
|
||||
resolved "http://registry.npm.taobao.org/recast/download/recast-0.10.33.tgz#942808f7aa016f1fa7142c461d7e5704aaa8d697"
|
||||
dependencies:
|
||||
@ -1881,15 +1877,6 @@ recast@0.10.33:
|
||||
private "~0.1.5"
|
||||
source-map "~0.5.0"
|
||||
|
||||
recast@^0.10.10:
|
||||
version "0.10.43"
|
||||
resolved "http://registry.npm.taobao.org/recast/download/recast-0.10.43.tgz#b95d50f6d60761a5f6252e15d80678168491ce7f"
|
||||
dependencies:
|
||||
ast-types "0.8.15"
|
||||
esprima-fb "~15001.1001.0-dev-harmony-fb"
|
||||
private "~0.1.5"
|
||||
source-map "~0.5.0"
|
||||
|
||||
recast@^0.11.17:
|
||||
version "0.11.22"
|
||||
resolved "http://registry.npm.taobao.org/recast/download/recast-0.11.22.tgz#dedeb18fb001a2bbc6ac34475fda53dfe3d47dfa"
|
||||
|
Loading…
Reference in New Issue
Block a user