Removes propTypes
from your React components.
This plugin deprecated. Use babel-plugin-transform-react-remove-prop-types
In
const Foo = React.createClass({
propTypes: {
foo: React.PropTypes.string
}
});
Out
const Foo = React.createClass({});
$ npm install --save-dev babel-plugin-react-remove-prop-types
.babelrc
{
"env": {
"production": {
"plugins": ["react-remove-prop-types"]
}
}
}
$ babel --plugins react-remove-prop-types script.js
require("babel-core").transform("code", {
plugins: ["react-remove-prop-types"]
});