oliviertassinari / babel-plugin-transform-react-remove-prop-types

Remove unnecessary React propTypes from the production build. :balloon:
MIT License
897 stars 61 forks source link

Add failing test case for #153 #159

Open lencioni opened 5 years ago

lencioni commented 5 years ago

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 yet, but I wanted to get up a failing test case to help showcase the bug.

@oliviertassinari do you have any ideas on how static class propTypes properties can be removed from ClassExpressions in wrap mode?

Related to #153

oliviertassinari commented 5 years ago

@oliviertassinari do you have any ideas on how static class propTypes properties can be removed from ClassExpressions in wrap mode?

We are already supporting it this use case. The logic I wrote is inspired by babel-plugin-transform-class-properties.