From af491991eb92c85461eea3d16a47a2cf26cb5481 Mon Sep 17 00:00:00 2001 From: "Xin Du (Clark)" Date: Mon, 9 Aug 2021 15:38:21 +0100 Subject: [PATCH] fix(babel): loose option for babel private-property-in-object (#9631) [release] --- packages/babel-preset-app/src/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/babel-preset-app/src/index.js b/packages/babel-preset-app/src/index.js index 3a1f7d3406..c255aa136b 100644 --- a/packages/babel-preset-app/src/index.js +++ b/packages/babel-preset-app/src/index.js @@ -142,7 +142,8 @@ module.exports = (api, options = {}) => { // but webpack 4 doesn't support the syntax when target supports and babel transpilation is skipped // https://github.com/webpack/webpack/issues/9708 '@babel/plugin-proposal-class-properties', - '@babel/plugin-proposal-private-methods' + '@babel/plugin-proposal-private-methods', + '@babel/plugin-proposal-private-property-in-object' ], shippedProposals, forceAllTransforms @@ -161,7 +162,8 @@ module.exports = (api, options = {}) => { }], // class-properties and private-methods need same loose value [require('@babel/plugin-proposal-class-properties'), { loose: true }], - [require('@babel/plugin-proposal-private-methods'), { loose: true }] + [require('@babel/plugin-proposal-private-methods'), { loose: true }], + [require('@babel/plugin-proposal-private-property-in-object'), { loose: true }] ) // Transform runtime, but only for helpers