Skip to content

Commit

Permalink
fix(plugins) Unbreak plugins support in Nylas Mail
Browse files Browse the repository at this point in the history
Properly use plugins specified in babelrc.json when using the babel
compiler. #3187
  • Loading branch information
jstejada committed Jan 26, 2017
1 parent 26c935f commit bbc54ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/compile-support/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit bbc54ab

Please sign in to comment.