From b855e874cc840a1f47846f9800a814aad309f9f4 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 11 May 2017 06:37:32 -0700 Subject: [PATCH] Use absolute locations for plugins and presets in packager babel config Reviewed By: davidaurelio Differential Revision: D5044244 fbshipit-source-id: ab1af28d0158c22d0426a7a3b3f1bb0a63abac4e --- packages/metro-bundler/babelRegisterOnly.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/metro-bundler/babelRegisterOnly.js b/packages/metro-bundler/babelRegisterOnly.js index 1a0b2df4..1f4d3e6f 100644 --- a/packages/metro-bundler/babelRegisterOnly.js +++ b/packages/metro-bundler/babelRegisterOnly.js @@ -19,13 +19,13 @@ function registerOnly(onlyList) { function config(onlyList) { _only = _only.concat(onlyList); return { - presets: ['es2015-node'], + presets: [require('babel-preset-es2015-node')], plugins: [ 'transform-flow-strip-types', 'syntax-trailing-function-commas', 'transform-object-rest-spread', 'transform-async-to-generator', - ], + ].map(pluginName => require(`babel-plugin-${pluginName}`)), only: _only, retainLines: true, sourceMaps: 'inline',