-
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
App does not start when downleveling past chrome 84 or safari 15 since angular 19 #29145
Comments
A correct repro : https://stackblitz.com/edit/stackblitz-starters-rkec1xbc The runtime cause of the error is |
Likely this is due to the removal of #28682 since in version 19 Safari 17 and 18 are officially supported prior versions are not. |
It looks like it indeed. Our customers are still massively coming from browsers versions outside of the supported range. Will we have to move to a custom builder to enable those babel transforms going forward ? |
There might by something related to terser at play as esbuild doesn't look to be impacted by this. |
I briefly reviewed this, and it appears the issue stems from the |
We are experiencing exactly the errors as mentioned in this issue. We need to target chrome 74 for our applications. And since upgrading to ng 19 we experienced this exact issue. |
Here is what I found out regarding this issue: The problem starts appearing at this commit angular/angular@93c3f7a Depending on the value of Note: I will only focus on the @angular/core package contentWith class Injector {
static { this.ɵprov = ɵɵdefineInjectable({
token: Injector,
providedIn: 'any',
factory: () => ɵɵinject(INJECTOR$1),
}); }
} With class Injector {
static ɵprov = ɵɵdefineInjectable({
token: Injector,
providedIn: 'any',
factory: () => ɵɵinject(INJECTOR$1),
});
} Build output with
|
Command
serve, build
Is this a regression?
The previous version in which this bug was not present was
19.0.0-next.13
Description
Application throws an error at startup when using the webpack builder with optimizations enabled and targeting browsers like Safari < 15 or Chrome < 84.
I think it may be linked to private class fields because of the browsers version but maybe not.
Minimal Reproduction
Set up a
.browserslistrc
file with eitherSafari >= 14
orChrome >= 83
,Configure
angular.json
to use the@angular-devkit/build-angular:browser
builder,Set
"optimization": true
and"buildOptimizer": true
,Run
ng serve
.Here is a stackblitz following the above instructions: https://stackblitz.com/edit/stackblitz-starters-fr33hnlm?file=.browserslistrc
Exception or Error
Your Environment
Anything else relevant?
I've noticed that the latest
next
versions (of bothangular
andangular-cli
) do not have this issue but the firstrc
does.@angular-devkit/build-angular:browser-esbuild
builder seems to work fine.The text was updated successfully, but these errors were encountered: