fix(js): Avoid @babel/preset-env warning in js/babel.ts (#14772)

This commit is contained in:
Sam Y 2023-10-19 22:05:04 +08:00 committed by GitHub
parent 93e1e1b67e
commit d798126e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,