From d798126e73b15e22a29db05f24e8d4a487ad425c Mon Sep 17 00:00:00 2001 From: Sam Y <996939+mauris@users.noreply.github.com> Date: Thu, 19 Oct 2023 22:05:04 +0800 Subject: [PATCH] fix(js): Avoid `@babel/preset-env` warning in js/babel.ts (#14772) --- packages/js/babel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/babel.ts b/packages/js/babel.ts index 13db89cae9..a9c98207a9 100644 --- a/packages/js/babel.ts +++ b/packages/js/babel.ts @@ -57,7 +57,7 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) { : { // Allow importing core-js in entrypoint and use browserslist to select polyfills. useBuiltIns: options.useBuiltIns ?? 'entry', - corejs: 3, + corejs: options.useBuiltIns !== false ? 3 : null, // Do not transform modules to CJS modules: false, targets: isModern ? { esmodules: 'intersect' } : undefined,