Blazor WASM PWA lazy loading module

Viewed 69

I have created a Blazor WASM PWA application that supports lazy loading of some modules to optimize the initial download. I have published on a hosting service on IIS. When the browser download the application files, I see that it download into the cache created by the service-worker, the modules that should be loaded with the lazy loading system.

My question is if this behavior is correct and therefore the lazy loading system is not intended for PWA applications or is it a bug and when the application is published the service-worker-assets.js file should not include the modules marked as lazyAssembly in the blazor.boot.json file and therefore should be excluded from the initial download.

I have tried to manually clear from the service-worker cache the modules that should be loaded with lazy loading and when the application requests them they are downloaded correctly from the server. This is what I expected.

I searched in internet, but I can't find any information about it, maybe some properties are missing on .csproj that make the configuration files prepared in a different way during compilation. I hope someone can help me. Thank you

0 Answers
Related