3.0.0 • Published 8 years ago
babel-plugin-react-remove-prop-types v3.0.0
Babel Plugin for removing React propTypes
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"]
});