babel-plugin-annotate-pure-calls

JSON →
library 0.5.0 ·javascript
verified May 27, 2026

Babel plugin (v0.5.0) that automatically inserts #__PURE__ annotations on top-level call expressions and new expressions in assignment contexts, enabling UglifyJS and Terser to perform dead code elimination for improved bundle sizes. Targeted at libraries where top-level calls are generally side-effect-free, but may break code if misapplied. Current stable version is 0.5.0 with Node >= 18 and peer dependency on @babel/core ^7.0.0. The plugin is actively maintained but the API is simple and stable. Compared to alternatives like 'annotate-pure-call-in-variable-declarator', this plugin covers broader contexts (IIFEs, nested IIFEs) and is more widely adopted.

total hits 21
actors 7 distinct systems
last hit 1d ago AhrefsBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · SA