Are there chunk size / loading time implications in choosing between:
Splitting a client side application into multiple bundles and serving them across different html pages (i.e. server side routing
/about => about.html => about.bundle.js
, etc) (this doesn't mean code splitting can't still be used on sub pages, e.g. admin/dashboard, admin/reports).Serving a single client side application that uses code splitting across client-side routes.
And would the significance of chunk size / loading time most likely be eclipsed by architectural considerations such as:
The need/desire to share/isolate state across different routes
Overhead of abstracting app initialization code so that it can run in each bundle vs possibility to optimise initialization code per app bundle.
?
In general, why would you choose one approach over the other?
Note: Many resources like survivejs discuss bundle splitting and code splitting, saying that the former is a less granular version of the latter. However, it is not clear when you might need to split bundles as opposed to just using code splitting, especially when you have the possibility to split those bundles across separate html pages.