don't use interopRequire if noInteropRequire is set for default module formatter
This commit is contained in:
parent
3ec97fc86d
commit
8164bb17ce
@ -142,7 +142,7 @@ DefaultFormatter.prototype._exportSpecifier = function (getRef, specifier, node,
|
||||
nodes.push(this._exportsWildcard(getRef(), node));
|
||||
} else {
|
||||
var ref;
|
||||
if (t.isSpecifierDefault(specifier.id)) {
|
||||
if (t.isSpecifierDefault(specifier.id) || this.noInteropRequire) {
|
||||
ref = t.memberExpression(getRef(), specifier.id);
|
||||
} else {
|
||||
ref = t.callExpression(this.file.addHelper("interop-require"), [getRef()]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user