add loose mode to __esModule
This commit is contained in:
@@ -20,7 +20,9 @@ CommonJSFormatter.prototype.init = function () {
|
||||
scope.rename("module");
|
||||
|
||||
if (!this.noInteropRequireImport && this.hasNonDefaultExports) {
|
||||
file.ast.program.body.push(util.template("exports-module-declaration", true));
|
||||
var templateName = "exports-module-declaration";
|
||||
if (this.file.isLoose("es6.modules")) templateName += "-loose";
|
||||
file.ast.program.body.push(util.template(templateName, true));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
exports.__esModule = true;
|
||||
Reference in New Issue
Block a user