-
Notifications
You must be signed in to change notification settings - Fork 11
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
Convert to v2 addon #324
Convert to v2 addon #324
Conversation
# Conflicts: # package.json # yarn.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on early adopting the new format!
{ | ||
"plugins": [ | ||
["@babel/plugin-proposal-decorators", { "legacy": true }], | ||
"@babel/plugin-proposal-class-properties", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there something that breaks if you don't transpile the class properties and decorators? I wouldn't have expected you to need these two plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for reviewing @ef4! And yes, this is an excellent point you raise here. I already thought about getting in touch with you on this, or filing an issue in the babel repo. I did try to leave decorators untranspiled, as that is supported by your definition of the Ember Language Standard. But indeed I failed to do so, so to unblock my effort I went for transpilation for now.
I first tried to only add @babel/plugin-syntax-decorators. The first paragraph suggests this will allow babel to parse decorators, but not transpile them, so just what we need:
It's unlikely you want to use this plugin directly as it only enables Babel to parse this syntax. Instead, use plugin-proposal-decorators to both parse and transform this syntax.
But this did not work. Babel still failed with some error, related to an unexpected @
syntax. I would have to try it again to get the exact error message.
Have you managed somewhere to get that use case working, i.e. let babel do all the transformation you want but leave decorators in place?
No description provided.