-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Make buildExportAll generate pure ES5 code. #3391
Conversation
The untransformed `let` keyword causes problems for older parsers. I understand using `let` instead of `var` ensures each getter function has its own binding for the KEY variable, but the same can be accomplished (with less code) using a `.forEach` callback function, and this way there's no need to worry about generating a unique name for the `key` variable.
I appreciate the effort, but as long as you have the block scoping transform enabled, it'll pretty much do this conversion for you automatically. We had a little regression between 6.6.0. and 6.6.3 that caused that to fail, but it is fixed now. I'm not sure what we'd gain by doing this. |
Current coverage is
|
Thanks, I'll try upgrading. As to what would be gained, it's less code and fewer new variables… but then again shouldn't |
Update: I'm finding that I can try to get to the bottom of what's going on with my preset, but I worry you're going to have more regressions of this kind. Why not make this helper more robust? |
I think we didn't do a great job on plugin composability in babel 6 so +1 for making them as robust and standalone as possible. |
I'm ok with doing this but we definetely need to figure out why it's not working when other transforms are included. |
Make buildExportAll generate pure ES5 code.
This will fix meteor/meteor#6380, thanks to babel/babel#3391.
This will fix meteor/meteor#6380, thanks to babel/babel#3391.
This will fix #6380, thanks to babel/babel#3391.
The untransformed
let
keyword causes problems for older parsers. I understand usinglet
instead ofvar
ensures each getter function has its own binding for theKEY
variable, but the same can be accomplished (with less code) using a.forEach
callback function, and this way there's no need to worry about generating a unique name for thekey
variable.