-
Notifications
You must be signed in to change notification settings - Fork 468
Es6 default import support #2677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@bobzhang not sure if this is priority, it is a major factor for the public and internal apps we build at my job with bucklescript but first class support for dynamic imports would be great, there was an issue that @glennsl opened after we discussed this at length on discord: #2364 It was closed because someone made a library to enable dynamic imports in BS but it be nice to have this "embedded" in the bucklescript platform: |
Heres the spec: Heres some writing on the feature:
It's been implemented in all major bundlers in the Javascript world and it allows shipping only code that needs to be executed per page, reducing overall js that needs to be loaded & parsed at a time. Making webapps snappier overall. |
hi @kennetpostigo would you discuss it in another issue, this issue is just for default import, thanks! |
@bobzhang would |
Any progress on this one? |
It seems we already support export default.
See http://exploringjs.com/es6/ch_modules.html
That's what we did for default export
For default import,
Expect generated ES6 code:
For commonjs
The text was updated successfully, but these errors were encountered: