Skip to content

Commit

Permalink
Fix babel warning about private-methods
Browse files Browse the repository at this point in the history
The "loose" option must be the same for:

- @babel/plugin-proposal-class-properties,
- @babel/plugin-proposal-private-methods
- @babel/plugin-proposal-private-property-in-object

class-properties and private-methods are dependencies of
@babel/preset-env, which is required by webpacker.

This commit sets the same loose value for both class-properties and
private-methods to silence the warning 

Fix #3008
  • Loading branch information
tagliala committed May 19, 2021
1 parent f1b956d commit 5fc3a85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/install/config/babel.config.js
Expand Up @@ -53,6 +53,12 @@ module.exports = function(api) {
useBuiltIns: true
}
],
[
'@babel/plugin-proposal-private-methods',
{
loose: true
}
],
[
'@babel/plugin-transform-runtime',
{
Expand Down
6 changes: 6 additions & 0 deletions lib/install/examples/react/babel.config.js
Expand Up @@ -62,6 +62,12 @@ module.exports = function(api) {
useBuiltIns: true
}
],
[
'@babel/plugin-proposal-private-methods',
{
loose: true
}
],
[
'@babel/plugin-transform-runtime',
{
Expand Down

0 comments on commit 5fc3a85

Please sign in to comment.