Closed
Description
It seems we already support export default.
export {
$$default,
$$default as default
}
See http://exploringjs.com/es6/ch_modules.html
const __default__ = «expression»;
export { __default__ as default };
That's what we did for default export
For default import,
external myFunction : unit -> unit = "my-module" [@@bs.default]
let () = myFunction ()
Expect generated ES6 code:
import myFunction from "my-module"
myFunction()
For commonjs
var myModule = require("my-module")
myModule.default ()