Make the --transformer CLI argument override the babelTransformerPath

Summary: D9070810 introduced a breaking change, making the `--transformer` CLI argument able to override the generic transformer instead of `babelTransformer`. Since we still have some scripts that assume `--transformer` is being used for overriding the babelTransformer path, we cannot do this breaking change yet, so this diff reverts the CLI handling to the old behaviour.

Reviewed By: jrwats

Differential Revision: D9550157

fbshipit-source-id: 8b4e26fcb5bca6e4b2f63b1e1a014bce23a31452
This commit is contained in:
Rafael Oleza 2018-08-28 18:51:15 -07:00 committed by Facebook Github Bot
parent ee543ecf86
commit f8f1870248
2 changed files with 0 additions and 7 deletions

View File

@ -44,10 +44,6 @@ async function buildBundle(
sourceMapUrl = path.basename(sourceMapUrl); sourceMapUrl = path.basename(sourceMapUrl);
} }
config.transformerPath = args.transformer
? path.resolve(args.transformer)
: config.transformerPath;
const requestOpts: RequestOptions = { const requestOpts: RequestOptions = {
entryFile: args.entryFile, entryFile: args.entryFile,
sourceMapUrl, sourceMapUrl,

View File

@ -25,9 +25,6 @@ async function dependencies(argv, configPromise, args, packagerInstance) {
} }
config.cacheStores = []; config.cacheStores = [];
if (args.transformer) {
config.transformer.babelTransformerPath = path.resolve(args.transformer);
}
const relativePath = path.relative( const relativePath = path.relative(
config.projectRoot, config.projectRoot,