-
Notifications
You must be signed in to change notification settings - Fork 595
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
Magic in the emitter callback? #694
Comments
That's odd. I tried to reproduce the error but couldn't. Have I missed something here? I'm using Bankai here to bundle the app, what are you using? Or are you maybe using an old version of Node which doesn't support arrow functions? |
I have remixed the starter tutorial linked from https://handbook.choo.io/your-first-choo-app/ keeping the original configuration. I just specified node version 10 just to be sure. If I copy in your code it breaks as well. https://glitch.com/~magical-apple https://glitch.com/edit/#!/magical-apple?path=index.js:1:0 Anything I could be missing? |
It uses an old version of uglifyify that doesn't support arrow functions. Update to v5 and it works, see remix here: https://glitch.com/edit/#!/cedar-manuscript?path=package.json:14:0 |
Confirmed. Thanks a lot. @tornqvist that should be updated in the |
Expected behavior
choo
should accept valid JS code in the emitter callback.Actual behavior
choo
throwswhen an ES6 arrow function is used the emitter callback.
Steps to reproduce behavior
This is working code (adapted from the intro tutorial, running on glitch)
When I replace
function ()
with() =>
choo
throws the above error. Some kind of magic going on?The text was updated successfully, but these errors were encountered: