This module has moved and is now available at @rollup/plugin-strip. Please update your dependencies. This repository is no longer maintained.
Remove debugger
statements and functions like assert.equal
and console.log
from your code.
npm install --save-dev rollup-plugin-strip
// rollup.config.js
import strip from 'rollup-plugin-strip';
export default {
input: 'src/index.js',
output: [
{
format: 'cjs',
file: 'dist/my-lib.js'
}
],
plugins: [
strip({
// set this to `false` if you don't want to
// remove debugger statements
debugger: true,
// defaults to `[ 'console.*', 'assert.*' ]`
functions: [ 'console.log', 'assert.*', 'debug', 'alert' ],
// remove one or more labeled blocks by name
// defaults to `[]`
labels: ['unittest'],
// set this to `false` if you're not using sourcemaps –
// defaults to `true`
sourceMap: true
})
]
};
MIT