Closed
Description
Command
build
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
15.0.5
Description
When switching from version 15.0.5 to version 15.1.0 of the CLI, the ng build command fails with the following error:
Error: Optimization error [main.4718ba8213dd7bf6.js]: SyntaxError: Unexpected token: punc (()
Minimal Reproduction
See jnizet/decouvertes-nature#521.
To reproduce locally:
- clone the project
- checkout to the branch
renovate/angular-cli-monorepo
- run
yarn
- run
ng build
Exception or Error
Error: Optimization error [main.4718ba8213dd7bf6.js]: SyntaxError: Unexpected token: punc (()
### Your Environment
```text
Angular CLI: 15.1.0
Node: 16.15.0
Package Manager: yarn 1.22.19
OS: darwin x64
Angular: 15.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1501.0
@angular-devkit/build-angular 15.1.0
@angular-devkit/core 15.1.0
@angular-devkit/schematics 15.1.0
@angular/fire 7.5.0
@schematics/angular 15.1.0
rxjs 7.8.0
typescript 4.8.4
### Anything else relevant?
_No response_