mirror of https://github.com/webpack/webpack.git
fixes #2895
This commit is contained in:
parent
c51c59cee1
commit
6d1f3e3fa3
|
|
@ -47,6 +47,8 @@ HarmonyExportSpecifierDependency.Template.prototype.apply = function(dep, source
|
|||
} else {
|
||||
content = "/* harmony export (binding) */ __webpack_require__.d(exports, " + JSON.stringify(used) + ", function() { return " + dep.id + "; });\n";
|
||||
}
|
||||
if(dep.position > 0)
|
||||
content = "\n" + content;
|
||||
source.insert(dep.position, content);
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
export const a = {
|
||||
x: 1
|
||||
}, b = {
|
||||
x: 2
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
import { a, b } from "./a";
|
||||
|
||||
it("should export a const value without semicolon", function() {
|
||||
a.should.be.eql({x: 1});
|
||||
b.should.be.eql({x: 2});
|
||||
});
|
||||
Loading…
Reference in New Issue