Need to exclude admin routes from prefetching in ssr+pwa mode
-
I want to dynamically load contents for my site and use PWA features e.g. saving apps on mobile and desktop.
Currently, I have fresh installation with some test pages and components. All my routes and components are using dynamic imports to load js chunks only when user goes to a particular route or a component is rendered and it is working fine in SPA and SSR mode. The problem occurs in PWA mode when it prefetches all chunks.
Here everything is being downloaded and when I view admin component in browser (which is chunk 4.js) the size column mentions that it is already prefetched.In my case most users will be only there to view pages and it will put extra load on my server to provide unnecessary components for the user.