rollup-plugin-strip-logger
v0.4.1
Published
Strips out references to a logger package.
Downloads
69
Readme
rollup-plugin-strip-logger
Strips out references to a logger package.
Warning: This is very much a work in progress. It's likely to be refactored into something more generic.
Installation
npm install --save-dev rollup-plugin-strip-logger
Usage
import stripLogger from 'rollup-plugin-strip-logger'
export default {
entry: 'src/index.js',
dest: 'dist/my-lib.js',
plugins: [
stripLogger({
variableNames: ['logger'],
propertyNames: ['_logger'],
packageNames: ['my-logger']
})
]
}
Options
variableNames
Remove all references to variables by the names in this array.
propertyNames
Remove all references to obj[name]
for each name
in this array.
packageNames
Remove all imports of packages/modules by the names in this array.
Author
License
MIT