From c15a6b620243d019c38d82e8be5ab3571f153791 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 --- packager/babelRegisterOnly.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packager/babelRegisterOnly.js b/packager/babelRegisterOnly.js index 1a0b2df4c..1f4d3e6f9 100644 --- a/packager/babelRegisterOnly.js +++ b/packager/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',