check plugin.default and then just plugin to support ES6 modules - closes #1627
This commit is contained in:
@@ -37,9 +37,10 @@ export default class PluginManager {
|
||||
|
||||
var loc = util.resolveRelative(`babel-plugin-${name}`) || util.resolveRelative(name);
|
||||
if (loc) {
|
||||
var plugin = require(loc);
|
||||
return {
|
||||
position: position,
|
||||
plugin: require(loc)
|
||||
plugin: plugin.default || plugin
|
||||
};
|
||||
} else {
|
||||
throw new ReferenceError(messages.get("pluginUnknown", name));
|
||||
|
||||
Reference in New Issue
Block a user