Skip to content

Commit e048d2e

Browse files
authored
Fix babel warning about private-methods (#3016)
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
1 parent f1b956d commit e048d2e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/install/config/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ module.exports = function(api) {
5353
useBuiltIns: true
5454
}
5555
],
56+
[
57+
'@babel/plugin-proposal-private-methods',
58+
{
59+
loose: true
60+
}
61+
],
5662
[
5763
'@babel/plugin-transform-runtime',
5864
{

lib/install/examples/react/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ module.exports = function(api) {
6262
useBuiltIns: true
6363
}
6464
],
65+
[
66+
'@babel/plugin-proposal-private-methods',
67+
{
68+
loose: true
69+
}
70+
],
6571
[
6672
'@babel/plugin-transform-runtime',
6773
{

0 commit comments

Comments
 (0)