-
Notifications
You must be signed in to change notification settings - Fork 12k
Optimize ES2015 static fields #13487
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
Comments
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this issue
Jan 22, 2019
Although ES5 classes had their static properties folded in, ES2015 ones did not. This PR adds that new functionality. It should also make this particular transform a bit faster, since it will stop early. Fix angular#13487
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this issue
Jan 22, 2019
Although ES5 classes had their static properties folded in, ES2015 ones did not. This PR adds that new functionality. It should also make this particular transform a bit faster since it will stop early. Fix angular#13487
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this issue
Jan 22, 2019
Although ES5 classes had their static properties folded in, ES2015 ones did not. This PR adds that new functionality. It should also make this particular transform a bit faster since it will stop early. Fix angular#13487
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this issue
Jan 22, 2019
Although ES5 classes had their static properties folded in, ES2015 ones did not. This PR adds that new functionality. It should also make this particular transform a bit faster since it will stop early. Fix angular#13487
mgechev
pushed a commit
that referenced
this issue
Jan 22, 2019
Although ES5 classes had their static properties folded in, ES2015 ones did not. This PR adds that new functionality. It should also make this particular transform a bit faster since it will stop early. Fix #13487
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🚀 Feature request
Description
Using the ES2015 target, TypeScript transpiles classes with static fields as a class plus the assignment of the static fields over the class itself.
As an example, the
TemplateRef
class in https://github.com/angular/angular/blob/73dcd72afbd782161c1674f1e647a1b357a78a67/packages/core/src/linker/template_ref.ts#L34-L62:Is transpiled to ES2015 as:
The property assignment in the transpiled code prevents the class from being removed by minifiers such as terser.
Describe the solution you'd like
Build Optimizer converts ES2015 static fields in such a way that they are not retained after minification.
The text was updated successfully, but these errors were encountered: