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