-
Notifications
You must be signed in to change notification settings - Fork 496
Closed
Labels
Milestone
Description
The files sidebar of talk is quite a large chunk of javascript that gets loaded and parsed on every page that has the viewer loaded. From the code it seems like there was a dedicated loader at some point but currently web pack just packs them into one entry point: https://github.com/nextcloud/spreed/blob/master/webpack.config.js#L10-L13
It might be feasible to actually split the chunks in a way that the larger components or dependencies are only loaded if the sidebar is actually shown.
https://webpack.js.org/guides/code-splitting/#dynamic-imports
Example from a practical use case with dashboard widgets: https://github.com/nextcloud/activity/pull/1079/files#diff-48b88a3417e903ef4241fa665050d5a5758f387c366ceb6a373ed072e6de150b