From 3bf896c973404261f4f7b25c25ea22adb1a85e7d Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Mon, 6 Nov 2023 11:24:41 +0100 Subject: [PATCH] Disable Babel polyfill injection in dev (#27691) --- babel.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/babel.config.js b/babel.config.js index 71e72d7138..9ced748a96 100644 --- a/babel.config.js +++ b/babel.config.js @@ -52,6 +52,10 @@ module.exports = (api) => { case 'development': reactOptions.development = true; envOptions.debug = true; + + // We need Babel to not inject polyfills in dev, as this breaks `preval` files + envOptions.useBuiltIns = false; + envOptions.corejs = undefined; break; }