How do we handle app-jsdeps.js
and app-opt.js
in a large Scala.js React applications
with a lot of js code & dependencies ?
I've build my first web application using @japgolly scalajs-react using @ochrons spa-tutorial example but even after optimising it the size of app-jsdeps.js (only 10 external JS deps)
and app-opt.js
file is around 900kb
which is taking about 8 seconds
to download before the page loads.
What do we usually do in this situation ?
- Do we split the app into multiple html pages on the server where each page will have it's own
app-jsdeps.js
andapp-opt.js
files which means new React-router for each page ? - Or do we split the
app-jsdeps.js
andapp-opt.js
into multiple files so that the download happens concurrently instead of one big chunk ?