properly handle export default shorthand, also consider export default foo; and export { foo as default } to be equivalent

This commit is contained in:
Sebastian McKenzie
2015-03-30 06:31:41 +11:00
parent f9c8d7d1fd
commit 8e1b6df970
5 changed files with 19 additions and 9 deletions

View File

@@ -1,9 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _foo = require("bar").foo;
exports.foo = _foo;
module.exports = _foo;

View File

@@ -1,4 +1,4 @@
"use strict";
import { foo as _foo } from "bar";
export { _foo as foo };
export { _foo as default };