Skip to content
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

Remove prop types in production #59

Merged
merged 2 commits into from
Apr 20, 2019
Merged

Conversation

realityking
Copy link
Contributor

Another piece from #49.

I decided to forgo the babel plugin because it doesn't seem to work right with babel 7. There are only two prop types so wrapping them manually is not a big deal.

Ideally - at least in theory - this would allow webpack to drop prop-types completely from a bundle if there's no other consumer of it. Even if that's not the case, it reduces bundle size a little.

@realityking
Copy link
Contributor Author

Note the webpack config change about ~5 times smaller. Not due to the other changes in here but, probably, by using the production versions of react and react-dom.

@realityking
Copy link
Contributor Author

@zpao Could you take a look at this one? 🙇

@zpao zpao merged commit 72621a4 into zpao:master Apr 20, 2019
@realityking
Copy link
Contributor Author

Thanks for merging! 🎉

@realityking realityking deleted the remove-prop-types branch April 20, 2019 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants