From feca3fd78b5f670481ffbe9c9c669bbd5f806600 Mon Sep 17 00:00:00 2001 From: Crypto Sheik <93099369+0xCryptoSheik@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:39:13 +0200 Subject: [PATCH] fix(build): enable loose (lighter) Babel syntax compilation for some safe syntax transforms, assuming public class fields do not shadow an existing getter in current class / subclass or superclass. Can also be achieved with the setPublicClassFields compiler assumption. See: - https://babeljs.io/docs/en/assumptions#setpublicclassfields - https://babeljs.io/docs/en/babel-plugin-proposal-class-properties#loose --- web3.js/babel.config.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/web3.js/babel.config.json b/web3.js/babel.config.json index a1b073b5d..f8a99f501 100644 --- a/web3.js/babel.config.json +++ b/web3.js/babel.config.json @@ -9,6 +9,23 @@ ["@babel/preset-typescript"] ], "plugins": [ - "@babel/plugin-proposal-class-properties" + [ + "@babel/plugin-proposal-class-properties", + { + "loose": true + } + ], + [ + "@babel/plugin-proposal-private-methods", + { + "loose": true + } + ], + [ + "@babel/plugin-proposal-private-property-in-object", + { + "loose": true + } + ] ] } \ No newline at end of file