From 5fc3a85bf4a569b601d5c897cdf2f907c45130a7 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Mon, 10 May 2021 16:20:46 +0200 Subject: [PATCH] Fix babel warning about private-methods 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 --- lib/install/config/babel.config.js | 6 ++++++ lib/install/examples/react/babel.config.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/install/config/babel.config.js b/lib/install/config/babel.config.js index 4df194934..2fdd7d376 100644 --- a/lib/install/config/babel.config.js +++ b/lib/install/config/babel.config.js @@ -53,6 +53,12 @@ module.exports = function(api) { useBuiltIns: true } ], + [ + '@babel/plugin-proposal-private-methods', + { + loose: true + } + ], [ '@babel/plugin-transform-runtime', { diff --git a/lib/install/examples/react/babel.config.js b/lib/install/examples/react/babel.config.js index c341fb291..92855f81b 100644 --- a/lib/install/examples/react/babel.config.js +++ b/lib/install/examples/react/babel.config.js @@ -62,6 +62,12 @@ module.exports = function(api) { useBuiltIns: true } ], + [ + '@babel/plugin-proposal-private-methods', + { + loose: true + } + ], [ '@babel/plugin-transform-runtime', {