Skip to content

Remove debugger statements and functions like assert.equal and console.log from your code

Notifications You must be signed in to change notification settings

nodefish/rollup-plugin-strip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-strip

Remove debugger statements and functions like assert.equal and console.log from your code.

Installation

npm install --save-dev rollup-plugin-strip

Usage

// rollup.config.js
import strip from 'rollup-plugin-strip';

export default {
  entry: 'src/index.js',
  dest: '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' ],

      // set this to `false` if you're not using sourcemaps –
      // defaults to `true`
      sourceMap: true
    })
  ]
};

License

MIT

About

Remove debugger statements and functions like assert.equal and console.log from your code

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%