-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore: add @__PURE__
annotation to ES5 output for uglify
#4147
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that it works. LGTM. Also happy that you moved it into another file!
// Prefix downleveled classes that extend another class w/ the @__PURE__ annotation | ||
.replace( | ||
/^(var (\S+) = )(\(function \(_super\) \{\n __extends\(\2, _super\);\n)/mg, | ||
'$1/*@__PURE__*/$3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move that RegExp to a constant as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only moved the first one because it's over 100 characters long and needed to be wrapped in a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me. Just think that it would be more clean if you have it like a stream (just running transformers)
But since its mostly temporary.. doesn't matter.
Also yes, I did test it with material.angular.io and seems to work fine. |
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. |
Context: https://gist.github.com/IgorMinar/09eadcb221a8253162078210639a344d