Open oskarrough opened 1 month ago
Tried using the manualChunks
feature of Rollup to split up the big ones. Not sure what effect it would have on performance in the end, or when the chunks are loaded.
dist/supabase-BzIw9nIb.js 180.56 kB │ gzip: 41.93 kB
dist/r4playerv1-BZf4AAU1.js 263.37 kB │ gzip: 67.23 kB
dist/ol-af2OZp3O.js 514.88 kB │ gzip: 114.13 kB
dist/r4.js 539.59 kB │ gzip: 136.02 kB
Our JavaScript for the components is 1.5mb. Considering we don't even have a framework™️ it's a lot.
However most of it is the dependency on
ol
(for the map) as far as I know.The site is definitely not slow even with the big bundle. It's cached. But we could still try to 1) reduce the size 2) split the big dependencies into other bundles? Like only load
ol
once the r4-map component is connected. But don't know how that would work.