Skip to content

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

Merged
merged 1 commit into from
Apr 21, 2017

Conversation

jelbourn
Copy link
Member

@jelbourn jelbourn requested review from devversion and mmalerba April 18, 2017 23:40
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 18, 2017
Copy link
Member

@devversion devversion left a 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'
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@devversion devversion Apr 18, 2017

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.

@jelbourn
Copy link
Member Author

Also yes, I did test it with material.angular.io and seems to work fine.

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Apr 18, 2017
@kara kara merged commit 76faae5 into angular:master Apr 21, 2017
@jelbourn jelbourn deleted the pure-annotation branch September 13, 2017 04:37
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants