From f8f1870248e9ec050840ad36a1d74051bd3d95b5 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Tue, 28 Aug 2018 18:51:15 -0700 Subject: [PATCH] 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 --- local-cli/bundle/buildBundle.js | 4 ---- local-cli/dependencies/dependencies.js | 3 --- 2 files changed, 7 deletions(-) diff --git a/local-cli/bundle/buildBundle.js b/local-cli/bundle/buildBundle.js index 426365a26..482fce1e6 100644 --- a/local-cli/bundle/buildBundle.js +++ b/local-cli/bundle/buildBundle.js @@ -44,10 +44,6 @@ async function buildBundle( sourceMapUrl = path.basename(sourceMapUrl); } - config.transformerPath = args.transformer - ? path.resolve(args.transformer) - : config.transformerPath; - const requestOpts: RequestOptions = { entryFile: args.entryFile, sourceMapUrl, diff --git a/local-cli/dependencies/dependencies.js b/local-cli/dependencies/dependencies.js index e72293e64..c604c345d 100644 --- a/local-cli/dependencies/dependencies.js +++ b/local-cli/dependencies/dependencies.js @@ -25,9 +25,6 @@ async function dependencies(argv, configPromise, args, packagerInstance) { } config.cacheStores = []; - if (args.transformer) { - config.transformer.babelTransformerPath = path.resolve(args.transformer); - } const relativePath = path.relative( config.projectRoot,