Skip to content
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

Annotating taggedTemplateLiteral calls as #__PURE__ #6327

Merged
merged 1 commit into from
Sep 30, 2017

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Sep 27, 2017

Q                       A
Fixed Issues Fixes #6324, fixes #5900
Patch: Bug Fix? no
Major: Breaking Change? no
Minor: New Feature? yes
Tests Added/Pass? yes
Spec Compliancy? n/a
License MIT
Doc PR no
Any Dependency Changes? no

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5072/

@brikou
Copy link

brikou commented Sep 27, 2017

Great!

@Andarist
Copy link
Member Author

@brikou keep in mind that this will make only taggedTemplateLiteral calls tree-shakeable, but you also need to mark as pure your css calls. You can do that with pure_funcs option of UglifyJS.

@brikou
Copy link

brikou commented Sep 28, 2017

thank you very much for your insights 👍

@Andarist
Copy link
Member Author

@brikou You might be interested in the plugin I'm creating.

When I add this feature it might help consumers of your component library (assuming you distribute one - if not its still advised to just use pure_funcs of the UglifyJS).

@jridgewell
Copy link
Member

Feel free to merge, this is a simple enough change.

@hzoo hzoo added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Sep 30, 2017
@hzoo hzoo merged commit d8d35ac into master Sep 30, 2017
@hzoo hzoo deleted the pure/tagged-template-literals branch October 2, 2017 02:13
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

taggedTemplateLiterals prevent tree shaking [taggedTemplateLiteral] not marked as pure
5 participants