-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari: SynthaxError: Left hand side of operaor '=' must be a reference. #21107
Comments
I am unsure whether ThreeJS is doing something crazy with its ES6 classes, but flat out getting a runtime syntax error in the production-built code just can't be right. |
I am having the exact same issue. Also something with isSpotlight. When disabling the optimization for scripts in angular.json it started to work. Not an option for prod builds though. |
Here is another report on StackOverflow: https://stackoverflow.com/questions/68224800/left-hand-side-of-operator-must-be-a-reference-only-in-webkit-safari-in-ang I also note from the reproduction that it only occurs when the code is minified (i.e. |
One last note: setting |
Is this purely a Terser issue, then, and should be logged against that? Or does Angular do some preprocessing which confuses the tool chain? |
The build optimizer pass is somethat specific to the Angular CLI. So it might be an issue on our side... |
This should no longer be an issue with 12.2 which is currently in pre-release. Can someone please try this out using |
The reproduction in the original description of this issue does indeed work with |
Seconded. Angular 12.2.0-next.3 and ThreeJS 0.130.1 play nicely together again. |
Yep, that works for me too. Thanks alot! |
Closing as per above. |
It works now. Thanks! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
I am not sure.
Description
My Angular Application is crashing only on Safari when three.js is included.
The error message:
SynthaxError: Left hand side of operaor '=' must be a reference.
Threre is a Stackoverflow Thread about this Issue:
https://stackoverflow.com/questions/66941849/chunkloaderror-in-angular-threejs-app-only-on-safari
🔬 Minimal Reproduction
I created this repo:
https://github.com/alexfriesen/angular-three-template
Which is deployed on:
https://alexfriesen.github.io/angular-three-template/
The same Code works just fine with Vite:
https://github.com/alexfriesen/retro
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
Tested with Safari 14
I looks like it is related to ES6 Changes in Three.js
The text was updated successfully, but these errors were encountered: