-
-
Notifications
You must be signed in to change notification settings - Fork 21
Allow React component displayName and propTypes to be removed in production builds #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, it is a good idea to avoid I had just assumed that Next.js eliminates To be sure, we should conditionally define I'm not a fan of using |
So, this would be a breaking change for anyone that doesn't have a bunder that deals with Although it's a little more verbose, this is not a breaking change: Here they are compared in a Next.js production build: The |
This improvement has been published in v11.1.0 🚀 |
Hi, can proptypes be removed from the production builds? Saves ~3kb. It's good for development but would be better if it's not exported out. Thanks.
Can be done via a babel plugin.
The text was updated successfully, but these errors were encountered: