-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use import
instead of module
#993
Conversation
* export Helpers as default export in `handlebars/compiler/base`
e80e6b4
to
79f15f1
Compare
@mmun would you mind merging this into your branch so we can move forward with emberjs/ember.js#10853 |
|
import * as Helpers from "./helpers"; results in
The toolchain doesn't support that syntax |
Can you explain the reason for this change? |
Looks like this is trying to hack around #855 but is introducing more tech debt. Not really a fan of this but would love to hear the argument for it. |
@kpdecker you're right about that. I'd certainly prefer to use This change is motivated by emberjs/ember.js#10853 (comment) What would it take to support that syntax (given the changes in transpiler landscape since #855) |
it is valid, we will need to upgrade the transpiler to support this (now or later) |
@kpdecker could we update https://github.com/kpdecker/es6-module-packager to use babel or a more recent |
That could be an option. es6-module-transpiler was a no go as it generated code that wouldn't run under IE. I don't have time to look into that now but I'd be glad to look at a pull request over there. |
Use the es6modules transpiler we have in the ember cli repo. It's Esperanto under the hood with flags enabled or enable able for es3 safety. It is also ultimately what ember core is currently build with |
@stefanpenner do you mean https://github.com/ember-cli/broccoli-es6modules? Does that introduce a broccoli dependency to the build process (it appears we're currently using Grunt)? |
If you don't want to do that. Look at how it calls Esperanto under the hood and drop Esperanto in here. There may even be an appropriate plugin for this build system. Just make sure to call Esperanto with the same flags ember-cli does. So es3 safety requirement is met. |
Closing in favor of #998 |
👏 |
handlebars/compiler/base