Skip to content

hakocat/rollup-plugin-remove-call

Repository files navigation

rollup-plugin-remove-call

A Rollup plugin to remove function calls.

Install

npm i rollup-plugin-remove-call --save-dev

Usage

The following example removes

  • addDebugLog(..)
  • console.log(...)
  • a?.b?.c(...) and a.b.c(...)
import { rollup } from "rollup";
import { removeCall } from 'rollup-plugin-remove-call';

export default {
    input: 'src/index.js',
    plugins: [
        removeCall({ toRemove: ['addDebugLog', 'console.log', 'a.b.c'] })
    ]
};

LICENSE

MIT © hakocat

About

A Rollup plugin to remove function calls.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published