Lazy Loading and Code Splitting are two of the main points of the PRPL Pattern, a pattern named by Google which intent is to to provide some structure to make the initial load of a Progressive Web App (PWA) as fast as possible, boosting the performance.
At this point, the router doesn't work as a Single Page App (SPA) router, since it assigns a new route to window.location directly, which performs a hard reload. Let’s see what we have to do to adapt our router to serve as a SPA router