From d9847a1b91bf68aeaf895eb832e815d0ad7c24a0 Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Thu, 6 Jul 2017 17:44:23 +0100 Subject: [PATCH] metro-bundler: tweak babel-register callsite --- packages/metro-bundler/src/babelRegisterOnly.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/metro-bundler/src/babelRegisterOnly.js b/packages/metro-bundler/src/babelRegisterOnly.js index fbb839da..1e0cf109 100644 --- a/packages/metro-bundler/src/babelRegisterOnly.js +++ b/packages/metro-bundler/src/babelRegisterOnly.js @@ -13,6 +13,10 @@ require('./setupNodePolyfills'); var _only = []; function registerOnly(onlyList) { + // This prevents `babel-register` from transforming the code of the + // plugins/presets that we are require-ing themselves before setting up the + // actual config. + require('babel-register')({only: [], babelrc: false}); require('babel-register')(config(onlyList)); }