take into consideration default export specifiers in common module formatter - fixes #1071
This commit is contained in:
@@ -63,7 +63,7 @@ var exportsVisitor = traverse.explode({
|
||||
}
|
||||
|
||||
if (!t.isExportDefaultDeclaration(node)) {
|
||||
var onlyDefault = node.specifiers && t.isExportDefaultSpecifier(node.specifiers[0]) && node.specifiers.length === 1;
|
||||
var onlyDefault = node.specifiers && node.specifiers.length === 1 && t.isSpecifierDefault(node.specifiers[0]);
|
||||
if (!onlyDefault) {
|
||||
formatter.hasNonDefaultExports = true;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,10 @@ export default class AMDFormatter extends DefaultFormatter {
|
||||
]));
|
||||
}
|
||||
|
||||
exportSpecifier() {
|
||||
CommonFormatter.prototype.exportSpecifier.apply(this, arguments);
|
||||
}
|
||||
|
||||
exportDeclaration(node) {
|
||||
if (this.doDefaultExportInterop(node)) {
|
||||
this.passModuleArg = true;
|
||||
|
||||
Reference in New Issue
Block a user