A Babel plugin that removes specific function calls (e.g., console.log) from your production code. Version 1.0.2 is the latest stable release, updated via bug fixes only. It is similar to webpack's strip-loader but tailored for Babel environments. The plugin is minimal, allowing you to specify an array of function call patterns to strip. It does not support computed property patterns (e.g., console["log"]) by design. Best paired with a process.env.NODE_ENV check for conditional stripping in production builds. Active development is low; the plugin is maintained but rarely updated.
npm install babel-plugin-strip-function-callVerified import paths — ran on the pinned version, not inferred.
Demonstrates Babel configuration to strip console.log calls only in production builds, with input/output example.
Use a different plugin or custom Babel visitor if you need to strip computed calls.
Use 'strip-function-call' as the plugin name inside your .babelrc or babel.config.js.
Always provide a 'strip' option with an array of function call strings. Example: { "strip": ["console.log"] }Place it in the 'plugins' array of your Babel config.
Run 'npm install babel-plugin-strip-function-call --save-dev'.
Ensure the plugin configuration includes a 'strip' array: e.g., ["strip-function-call", { "strip": ["console.log"] }]Check that NODE_ENV is set to 'production' and that the plugin name is 'strip-function-call' inside Babel config.
No dependency data recorded yet.