Example

In

const Foo = React.createClass({
  propTypes: {
    foo: React.PropTypes.string
  }
});

Out

const Foo = React.createClass({});

Installation

$ npm install --save-dev babel-plugin-react-remove-prop-types

Usage

Via .babelrc (Recommended)

.babelrc

{
  "env": {
    "production": {
      "plugins": ["react-remove-prop-types"]
    }
  }
}

Via CLI

$ babel --plugins react-remove-prop-types script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["react-remove-prop-types"]
});

License

MIT license