-
Notifications
You must be signed in to change notification settings - Fork 6
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
Strip PropTypes from production builds #8
Comments
This could be easily done in our Apps webpack config. Just add that plugin for the production build. For libs it's not really worst it. To me the most significant size gain we can have are:
|
Yeah, I forgot about our libs... But, about:
If we move forward with #5 Then we will apply babel-loader to all our internal libraries in our bundles compilation.
So we can use this plugin in our webpack config today, and it'll be ~really worth it the day we tackle #5 Thanks for sharing your insights, we definitely to get on these |
I'm concerned about build time, especially in dev, but everything's open. Food for thoughts: |
I think there's no reason for us to compile the legacy bundle in development, so build time increase should not be an issue. The main thing I'm gathering from these discussions is that applying |
Closing this as no longer relevant. We are applying |
Though we use Flow almost everywhere, there are still quite a lot of PropTypes left in our production bundles.
In a typical production bundle,
.propTypes
search gives ~150 occurences.We'd gain precious bytes by using a plugin such as
babel-plugin-transform-react-remove-prop-types
in production builds while we progressively get rid of propTypes alltogether.The text was updated successfully, but these errors were encountered: