-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Labels
angular/build:applicationarea: @angular/buildarea: @angular/ssrfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfeature: in backlogFeature request for which voting has completed and is now in the backlogFeature request for which voting has completed and is now in the backlog
Description
Which @angular/* package(s) are relevant/related to the feature request?
platform-server
Description
When loading a route, the browser downloads the HTML file, then the main.js file, and only after that it loads other files that are required by the main js file, for example, a component that is lazy loaded using loadComponent in the router.
Proposed solution
I think there is an opportunity to use the fact that SSR already had to render the page, so should know which bundles are required for this route. If the bundles can be identified, then they could be preloaded (https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload) so that the browser can download all of the js files that are required to render the page at the same.
Alternatives considered
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
angular/build:applicationarea: @angular/buildarea: @angular/ssrfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfeature: in backlogFeature request for which voting has completed and is now in the backlogFeature request for which voting has completed and is now in the backlog