{"library":"babel-plugin-annotate-pure-calls","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"0.5.0","tags":["javascript","babel","plugin","pure","side-effects","uglifyjs"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-annotate-pure-calls","imports":["// In .babelrc or babel.config.js: plugins: ['annotate-pure-calls']","const annotatePureCalls = require('babel-plugin-annotate-pure-calls');","// programmatic usage:\nconst babel = require('@babel/core');\nbabel.transform(code, { plugins: [require('babel-plugin-annotate-pure-calls')] });"]},{"cmd":"yarn add babel-plugin-annotate-pure-calls","imports":[]},{"cmd":"pnpm add babel-plugin-annotate-pure-calls","imports":[]}],"homepage":null,"github":"https://github.com/Andarist/babel-plugin-annotate-pure-calls","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-annotate-pure-calls","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-annotate-pure-calls/compatibility"}}