Skip to content

Commit c6c6b5d

Browse files
committed
Merge pull request webpack#2222 from mastercactapus/master
Fix issue webpack#2221 by adding a newline character to generated code
2 parents b0fffd5 + ba80387 commit c6c6b5d

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎lib/dependencies/HarmonyExportSpecifierDependency.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ HarmonyExportSpecifierDependency.Template.prototype.apply = function(dep, source
3939
} else if(dep.immutable) {
4040
content = "/* harmony export */ exports[" + JSON.stringify(used) + "] = " + dep.id + ";";
4141
} else {
42-
content = "/* harmony export */ Object.defineProperty(exports, " + JSON.stringify(used) + ", {configurable: false, enumerable: true, get: function() { return " + dep.id + "; }});";
42+
content = "\n/* harmony export */ Object.defineProperty(exports, " + JSON.stringify(used) + ", {configurable: false, enumerable: true, get: function() { return " + dep.id + "; }});";
4343
}
4444
source.insert(dep.position, content);
4545

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export var foo = "bar"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
it("should compile non-immutable exports with missing semicolons", function(){
2+
require("./exportvar");
3+
});

0 commit comments

Comments
 (0)