Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Add babel-plugin-annotate-pure-calls #215

Open
Beraliv opened this issue May 20, 2020 · 0 comments
Open

Add babel-plugin-annotate-pure-calls #215

Beraliv opened this issue May 20, 2020 · 0 comments

Comments

@Beraliv
Copy link
Member

Beraliv commented May 20, 2020

⭐️ S (situation) ⭐️

UglifyJS cannot clearly understand if the module is side effect free

⭐️ T (task) ⭐️

babel-plugin-annotate-pure-calls helps with automatic #PURE annotation insertion. It add the comment to top level call expressions and new expressions in assignment contexts (those are considered by the plugin as side effect free). This helps UglifyJS to perform dead code elimination more efficiently and therefore reduces the bundle sizes for the consumers

Link: https://www.npmjs.com/package/babel-plugin-annotate-pure-calls

⭐️ A (action) ⭐️

Add babel-plugin-annotate-pure-calls

⚠️ However, it can break current usage ⚠️

⭐️ R (result) ⭐️

It can lead to even more size reduction

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant