Skip to content

wearefx/rollup-plugin-strip-prop-types

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-strip-prop-types

Remove propTypes and defaultProps statements from ReactJs components, also removes the imported package. It expect you are using prop-types package.

Installation

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

Usage

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

export default {
  entry: 'src/index.js',
  dest: 'dist/my-lib.js',
  plugins: [
    stripPropTypes({
      // set this to `false` if you're not using sourcemaps –
      // defaults to `true`
      sourceMap: true
    })
  ]
};

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%