diff --git a/transformer.js b/transformer.js index 4700407c..70dde770 100644 --- a/transformer.js +++ b/transformer.js @@ -48,6 +48,7 @@ function transform(src, filename, options) { // Only resolve the plugin if it's a string reference. if (typeof plugin[0] === 'string') { plugin[0] = require(`babel-plugin-${plugin[0]}`); + plugin[0] = plugin[0].__esModule ? plugin[0].default : plugin[0]; } return plugin; });