1.0.1 • Published 9 years ago
babel-plugin-remove-prop-types v1.0.1
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"]
});