-
Notifications
You must be signed in to change notification settings - Fork 252
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
Code Splitting React Intl Locales #1197
Comments
You can check out my webpack visualizer with example code splitting sizes: https://kennybll.herokuapp.com/js/statistics.html. It may need to reload heroku's server ( I have free service not paid ). |
https://kennybll.herokuapp.com/js/statistics.html is bigger than thanhttps://staging.busy.org/js/statistics.html for me |
vendor and main are smaller though. Also for some reason I count 51 locales in src on the kennybll vs 40 on staging. That could be why it's larger |
I found out why... if you look under src/client/translations/index.js you see no one ever added the extra locals from /src/client/locales. @bonustrack We also need to add those to /src/settings/Settings.js |
Expected behavior
We should split the react-intl locales to make the bundle smaller. I figure to use webpacks dynamic inport(). This will load it separately. I tried this and it saves around 400k.
Actual behavior
Bundles all translations to the main bundles.
How to reproduce
https://busy.org/js/statistics.html shows translations take up 37.6%.
I started to work on it. I am about to add a pull request. Just thought to add it here first. I am willing to be assigned.
The text was updated successfully, but these errors were encountered: