emberjs / emberjs/ember-cli-babel

"loose" warning for @babel/plugin-proposal-private-property-in-object

Open
#415 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
152
Forks
115
Avg merge
23h 22m
Merged PRs (30d)
4

Description

Running an app or addon with what is currently the latest `ember-cli-babel` and `@babel/preset-env` (`ember-cli-babel@7.26.6` and `@babel/preset-env@7.15.6`) results in this warning:

```
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.
```

Should we be adding that option to the config anytime [this block](https://github.com/babel/ember-cli-babel/blob/085c408b88a058bdbcaa298a5e59c9511e832073/lib/babel-options-util.js#L345-L359) runs?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.