0.1.0 • Published 2 years ago

rollup-plugin-remove-call v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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