allow `rn.cli-config.js` w/o `getTransformModulePath`
Reviewed By: bestander Differential Revision: D3509026 fbshipit-source-id: d7db3de13ecc92f6ddfdcec3029c78915e1e66c0
This commit is contained in:
parent
e5b389e44c
commit
970f9335a9
|
@ -32,9 +32,10 @@ function buildBundle(args, config, output = outputBundle, packagerInstance) {
|
||||||
process.env.NODE_ENV = args.dev ? 'development' : 'production';
|
process.env.NODE_ENV = args.dev ? 'development' : 'production';
|
||||||
}
|
}
|
||||||
|
|
||||||
const transformModulePath = args.transformer ?
|
const transformModulePath =
|
||||||
path.resolve(args.transformer) :
|
args.transformer ? path.resolve(args.transformer) :
|
||||||
config.getTransformModulePath();
|
typeof config.getTransformModulePath === 'function' ? config.getTransformModulePath() :
|
||||||
|
undefined;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
projectRoots: config.getProjectRoots(),
|
projectRoots: config.getProjectRoots(),
|
||||||
|
|
|
@ -54,9 +54,10 @@ function _dependencies(argv, config, resolve, reject, packagerInstance) {
|
||||||
reject(`File ${rootModuleAbsolutePath} does not exist`);
|
reject(`File ${rootModuleAbsolutePath} does not exist`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const transformModulePath = args.transformer ?
|
const transformModulePath =
|
||||||
path.resolve(args.transformer) :
|
args.transformer ? path.resolve(args.transformer) :
|
||||||
config.getTransformModulePath();
|
typeof config.getTransformModulePath === 'function' ? config.getTransformModulePath() :
|
||||||
|
undefined;
|
||||||
|
|
||||||
const packageOpts = {
|
const packageOpts = {
|
||||||
projectRoots: config.getProjectRoots(),
|
projectRoots: config.getProjectRoots(),
|
||||||
|
|
|
@ -69,9 +69,10 @@ function runServer(args, config, readyCallback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPackagerServer(args, config) {
|
function getPackagerServer(args, config) {
|
||||||
const transformModulePath = args.transformer ?
|
const transformModulePath =
|
||||||
path.resolve(args.transformer) :
|
args.transformer ? path.resolve(args.transformer) :
|
||||||
config.getTransformModulePath();
|
typeof config.getTransformModulePath === 'function' ? config.getTransformModulePath() :
|
||||||
|
undefined;
|
||||||
|
|
||||||
return ReactPackager.createServer({
|
return ReactPackager.createServer({
|
||||||
nonPersistent: args.nonPersistent,
|
nonPersistent: args.nonPersistent,
|
||||||
|
|
Loading…
Reference in New Issue