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

Properly handle class properties proposal #420

Merged
merged 1 commit into from
Dec 14, 2021

Commits on Dec 8, 2021

  1. Properly handle class properties proposal

    Historically, we only add the `@babel/plugin-proposal-class-properties`
    so that we make sure the ordering is right with the decorators proposal
    (otherwise, it can end up compiling in the wrong order). With a recent
    version of `@babel/preset-env` and, transitively, `caniuse-lite`, this
    resulted in cases where we added that plugin but *not* related plugins
    for private class properties, which in turn triggered a Babel assertion
    about not adding the properties together as appropriate when the caniuse
    database (correctly) reported that .
    
    The fix is:
    
    1.  Bump to a more recent version of `@babel/preset-env`, which comes
        with a correspondingly bumped version of `caniuse-lite`, which in
        turn correctly understands what the latest versions of targeted
        browsers are.
    
    2.  Include in `ember-cli-babel` itself a check for whether we even
        *need* to add the plugin, and only provide it when the provided
        `targets` indicate that they require it.
    
    Resolves emberjs#419
    chriskrycho authored and rwjblue committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    0d47e8b View commit details
    Browse the repository at this point in the history