emberjs / ember-cli-babel

Ember CLI plugin for Babel
MIT License
153 stars 119 forks source link

Remove the "class-properties" and "private-methods" plugins #501

Closed Windvis closed 7 months ago

Windvis commented 12 months ago

ember-cli-babel hardcodes these plugins so they are always transpiled even if the app's targets support the features natively. @babel/preset-env v7.14 also includes these plugins by default so these features would still be transpiled if needed.

I think we can safely remove the plugins without it being a breaking change.

Windvis commented 12 months ago

Partly solved by https://github.com/babel/ember-cli-babel/pull/449 since that removes the "class-properties" plugin.

Windvis commented 12 months ago

Looking into it, it seems it won't be this simple (which is probably why it wasn't done before 😅):

Some things I encountered:

This is the same issue as mentioned here: https://github.com/babel/ember-cli-babel/issues/447

I've opened a discussion in the babel repo to see if this behavior is intended: https://github.com/babel/babel/discussions/15912