set passModuleArg when handling default export specifiers in amd module formatter - fixes #1260
This commit is contained in:
parent
35af771a29
commit
47d253c732
@ -105,6 +105,7 @@ export default class AMDFormatter extends DefaultFormatter {
|
|||||||
|
|
||||||
exportSpecifier(specifier, node, nodes) {
|
exportSpecifier(specifier, node, nodes) {
|
||||||
if (this.doDefaultExportInterop(specifier)) {
|
if (this.doDefaultExportInterop(specifier)) {
|
||||||
|
this.passModuleArg = true;
|
||||||
nodes.push(util.template("exports-default-assign", {
|
nodes.push(util.template("exports-default-assign", {
|
||||||
VALUE: specifier.local
|
VALUE: specifier.local
|
||||||
}, true));
|
}, true));
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
var a = 1;
|
||||||
|
export { a as default };
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
define(["exports", "module"], function (exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var a = 1;
|
||||||
|
module.exports = a;
|
||||||
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user