I recently started working on a JSS React template. Today I ran jss build
and found that the vendor chunk size is 436KB non-gzipped. Being that JSS is built on top of CRA whose vendor files total 118KB, I'm a bit worried about the ~320KB difference.
I also checked Chrome's coverage devtool and found that 43% of the vendor code is not actually used, although I assume it would be less in connected mode (I have no way to test that yet).
Now, I am aware that JSS is currently in Tech Preview, so I'm curious if this point will be addressed in the final release or if it's even seen as a concern by the dev team. At the moment, loading half a MB for just libs is a huge performance hit for our users and I'm reluctant about using JSS in production.
Am I missing something? Is there anything else I can do aside from ejecting and/or caching the files?
Thank you!
Please note that this is a different question than Angular Bundle size issue which concerns the unknown modules, and not the chunk size.