Skip to content

ska737/BlazorWasmLazyLoadingIssue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazy Loading Example

Purpose

The purpose of this repository is to have a minimalist working example of an issue with Blazor WASM under a non-default base path URL and lazy loading assemblies with static resources.

How to Run

Simply just clone the repository and debug. The site is hosted at a base path of /lazy-loading/ and the lazy loaded resource/page is at /lazy-loading/external.

Issues

When first loading, pull up the browser developer tools and you will see two requests attempting to pull down the LazyLoadThis...bundle.scp.css file. First one succeeds, second one fails. Since the second one fails, the first one is overwritten with the "result", which causes any reference to the file not to work.

The following screenshot shows the (filtered) requests when navigating to the base path URL: Base Path Navigation Issue

The following screenshot shows the (filtered) requests when navigating to the lazy loaded path: Lazy Loading Navigation Issue

Expected Behavior

  1. The static resources of the lazy loaded assembly not to be pulled down on initial load.
  2. The pulling of such resources to adhere to the base path URL set in the index.html file.

About

Minimal example of an issue with Blazor WASM and lazy loading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published