Closed chriskrycho closed 2 years ago
Tested this, besides the unit tests, by doing a yarn pack
and directly referenced the resulting .tgz
and confirmed it works in do-it-break
. You should also be able to use the PR by GitHub reference and confirm it works, and you can also check out the latest version of do-it-break
and see that it is now fixed there by referencing this commit.
I confirm that with this branch, things work as expected!
I expect some perf / build improvements from this! let's goooooo :ship:
nice work @chriskrycho <3
Rebased / amended to kick off a CI run
nice work @chriskrycho <3
Totally a team effort with @rwjblue – we spent a half day pairing on it till we had a solution; I just did the "write some tests and open a PR" bit. ;)
Thanks, @rwjblue !!!!! <3
I super excited to deploy these updates everywhere!!!
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:
Bump to a more recent version of
@babel/preset-env
, which comes with a correspondingly bumped version ofcaniuse-lite
, which in turn correctly understands what the latest versions of targeted browsers are.Include in
ember-cli-babel
itself a check for whether we even need to add the plugin, and only provide it when the providedtargets
indicate that they require it.Resolves #419