Skip to content
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

Merged
merged 20 commits into from
Oct 19, 2021
Merged

Convert to v2 addon #324

merged 20 commits into from
Oct 19, 2021

Conversation

simonihmig
Copy link
Owner

No description provided.

@simonihmig simonihmig marked this pull request as ready for review October 19, 2021 15:06
@simonihmig simonihmig added breaking enhancement New feature or request labels Oct 19, 2021
@simonihmig simonihmig merged commit 8277ae6 into master Oct 19, 2021
@simonihmig simonihmig deleted the v2 branch October 19, 2021 15:06
Copy link

@ef4 ef4 left a 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",
Copy link

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.

Copy link
Owner Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants