Merge pull request #2697 from shuhei/enable-plugins-built-with-babel-6

Enable plugins built with Babel 6.0
This commit is contained in:
Sebastian McKenzie 2015-10-31 06:14:29 +00:00
commit b5b7e346a0

View File

@ -115,6 +115,7 @@ export default class OptionManager {
let pluginLoc = resolve(`babel-plugin-${plugin}`, dirname) || resolve(plugin, dirname);
if (pluginLoc) {
plugin = require(pluginLoc);
plugin = plugin.__esModule ? plugin.default : plugin;
} else {
throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i));
}