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';
|
||||
}
|
||||
|
||||
const transformModulePath = args.transformer ?
|
||||
path.resolve(args.transformer) :
|
||||
config.getTransformModulePath();
|
||||
const transformModulePath =
|
||||
args.transformer ? path.resolve(args.transformer) :
|
||||
typeof config.getTransformModulePath === 'function' ? config.getTransformModulePath() :
|
||||
undefined;
|
||||
|
||||
const options = {
|
||||
projectRoots: config.getProjectRoots(),
|
||||
|
|
|
@ -54,9 +54,10 @@ function _dependencies(argv, config, resolve, reject, packagerInstance) {
|
|||
reject(`File ${rootModuleAbsolutePath} does not exist`);
|
||||
}
|
||||
|
||||
const transformModulePath = args.transformer ?
|
||||
path.resolve(args.transformer) :
|
||||
config.getTransformModulePath();
|
||||
const transformModulePath =
|
||||
args.transformer ? path.resolve(args.transformer) :
|
||||
typeof config.getTransformModulePath === 'function' ? config.getTransformModulePath() :
|
||||
undefined;
|
||||
|
||||
const packageOpts = {
|
||||
projectRoots: config.getProjectRoots(),
|
||||
|
|
|
@ -69,9 +69,10 @@ function runServer(args, config, readyCallback) {
|
|||
}
|
||||
|
||||
function getPackagerServer(args, config) {
|
||||
const transformModulePath = args.transformer ?
|
||||
path.resolve(args.transformer) :
|
||||
config.getTransformModulePath();
|
||||
const transformModulePath =
|
||||
args.transformer ? path.resolve(args.transformer) :
|
||||
typeof config.getTransformModulePath === 'function' ? config.getTransformModulePath() :
|
||||
undefined;
|
||||
|
||||
return ReactPackager.createServer({
|
||||
nonPersistent: args.nonPersistent,
|
||||
|
|
Loading…
Reference in New Issue