Closed stnor closed 1 year ago
I should add we're using yarn pnp, but it doesn't seem to matter if we turn it off.
This appears to have been reported in #24347 and should have been fixed in 15.0.3.
Can you provide the output of yarn list --pattern @angular-devkit/
?
I run yarn 3.5 (berry) so I don't have access to yarn list
:(
yarn info --recursive --dependents
showed a bunch of mixed 15.0.0 and 15.2.6 deps, so I cleared the yarn.lock
and reinstalled. Solved it.
You're a life-saver!
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Command
build
Is this a regression?
The previous version in which this bug was not present was
14.x
Description
I am getting a Nullish coalescing operator (??) (es2022) in main.js when building for production on Angular 15. When building for development everything works fine on iOS 12.5
Generated Webpack config:
If I remove the JavaScriptOptimizerPlugin from the prod build's webpack config manually (using custom-webpack), the web page loads in IOS 12.5 (ES2015), so the issue seems to be related to the optimizer.
I am aware that older browsers like IOS 12.5 isn't supported, but I really want to upgrade to 15 and build for ES2015.
The optimizer is called with the following config:
Minimal Reproduction
I was unable to reproduce on a vanilla project with a
.browserslist
containingios_saf >= 12.5
I compared the javascript-optimizer files between 14.2.x and 15.2.x and can see there are some changes, but cannot figure out why the 15.2.x branch doesn't produce ES2015 for main (or other bundles).Exception or Error
I'm getting a Nullish coalescing operator (??) in the main bundle which Safari on iOS 12.5 doesn't recognise. Here's a part of the main bundle (pretty printed) - this is NOT our code, btw.
Your Environment
Anything else relevant?
Same issue when building on the build server (on linux). Any help much appreciated, as we've spent quite a lot of work getting the (very large) code base up to 15.