/babel-plugin-react-remove-prop-types

Deprecated, use babel-plugin-transform-react-remove-prop-types

Primary LanguageJavaScriptMIT LicenseMIT

Babel Plugin for removing React propTypes

Circle CI Downloads

Removes propTypes from your React components.

This plugin deprecated. Use babel-plugin-transform-react-remove-prop-types

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