babel-plugin-transform-react-remove-prop-types icon indicating copy to clipboard operation
babel-plugin-transform-react-remove-prop-types copied to clipboard

Remove unnecessary React propTypes from the production build. :balloon:

Results 18 babel-plugin-transform-react-remove-prop-types issues
Sort by recently updated
recently updated
newest added

With classes you can also define your `propTypes` on a static getter property, which this plugin doesn't seem to be able to remove currently. Example: ```js class MyComponent extends React.Component...

enhancement

I'm aware that issues have been raised for this previously and work done to fix it. However I'm seeing issues with a library (ReactPopper) that uses this plugin. The library...

bug

This PR intended to add support for ES5 modules (3rd party components). Please bear with my meager skills, I have never worked with babel dev before.

We end up with ``` template.expression is not a function at wrapTemplate (/*/node_modules/babel-plugin-transform-react-remove-prop-types ``` From here https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types/pull/168/files#diff-1fdf421c05c1140f6d71444ea2b27638R157 When we are using `mode: wrap` for our code-base Installing `0.4.19` works as...

I have been investigating a bug that occurs when a ClassExpression is using the experimental class properties for propTypes. I am not sure what the best fix for it is...

Starting with 0.4.15, incorrect code is generated when using the `mode: "wrap"` setting for a prop-type like this ```js const generateType = (x) => { return PropTypes.oneOf([x-1, x, x+1]); };...

We have some packages that have some custom propTypes defined in modules in that package itself. For example: ```js import customPropType from '../propTypes/customPropType'; ``` These custom propTypes can also be...

enhancement

Is it possible to implement removing of redundant `defaultProps` values definitions which are `undefined`? **Before** trnasormation ```js FlyoutMenu.defaultProps = { centered: false, autofocus: true, className: undefined, innerRef: undefined, options: undefined,...