Babel Plugin for removing propTypes property from ES2015 classes
Removes propTypes property from classes
Example
In
Class Foo {
propTypes: {
foo: React.PropTypes.string
}
}
Out
Class Foo {
}
Installation
$ npm install --save-dev babel-plugin-remove-prop-types
Usage
Via .babelrc
(Recommended)
.babelrc
{
"env": {
"production": {
"plugins": ["remove-prop-types"]
}
}
}
Via CLI
$ babel --plugins remove-prop-types script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["remove-prop-types"]
});