After updating Angular to version 15, where the target
of compilerOptions
is automatically set to ES2022
, my angular web component is not working anymore for Chrome 53.
This error is showing in console: Uncaught SyntaxError: Unexpected token {
I am importing the following polyfills:
- custom-elements-es5-adapter.js
- webcomponents-bundle.js
I tried to lower the Chrome version in browserlist
, but this has no affect. Changing the target doesn't help either, because Angular CLI sets it back to es2022
and shows this message: TypeScript compiler options "target" and "useDefineForClassFields" are set to "ES2022" and "false" respectively by the Angular CLI.
Does somebody know how to let angular web components work again on old Chrome browsers for Angular 15?