From bbc54ab26d98708cfe7f3f8192a14a99496fe417 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Wed, 25 Jan 2017 22:41:54 -0800 Subject: [PATCH] fix(plugins) Unbreak plugins support in Nylas Mail Properly use plugins specified in babelrc.json when using the babel compiler. #3187 --- src/compile-support/babel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compile-support/babel.js b/src/compile-support/babel.js index 52bafcee5c..ffe3fa2673 100644 --- a/src/compile-support/babel.js +++ b/src/compile-support/babel.js @@ -18,6 +18,9 @@ var defaultOptions = require('../../static/babelrc.json') defaultOptions.presets = defaultOptions.presets.map((modulename) => require.resolve(`babel-preset-${modulename}`) ); +defaultOptions.plugins = defaultOptions.plugins.map((modulename) => + require.resolve(`babel-plugin-${modulename}`) +); exports.shouldCompile = function (sourceCode, filePath) { return (filePath.endsWith('.es6') || filePath.endsWith('.jsx'))