fix(js): Respect loose option provided from config (#23406)

closes: #21937
This commit is contained in:
Nicholas Cunningham 2024-05-15 14:05:17 -06:00 committed by GitHub
parent 425d442d44
commit efdfb694f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,7 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) {
// All other options will fail in Jest since Node does not support some ES features
// such as import syntax.
isTest || process.env.NODE_ENV === 'test' || process.env.JEST_WORKER_ID
? { targets: { node: 'current' }, loose: true }
? { targets: { node: 'current' }, loose }
: createBabelPresetEnvOptions(options.useBuiltIns, isModern, loose),
],
[