rollup-plugin-strip-prop-types

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i rollup-plugin-strip-prop-types

Weekly Downloads

150

Version

1.0.3

License

MIT

Unpacked Size

10.7 kB

Total Files

6

Last publish

Collaborators

  • daniele_cammarata