Skip to content

[3.2-rc] Document Blazor loadBootResource configuration option #18031

@captainsafia

Description

@captainsafia

Recently, a loadBootResource option was added to Blazor's JS API (link) that allows users to configure where different app resources should be loaded from.

We should add some documentation (perhaps under the Host + Deploy) section that explains to users how this API can be used.

Blazor.start({
  loadBootResource: function (type, name, defaultUri, integrity) {
    if (type === "timezonedata") {
      return "https://my-awesome-cdn.com/" + name;    
    }
  },
});

Some scenarios that this API can be used for:

  • Allow users to load static resources (like timezone data or dotnet.wasm) from CDN
  • Loading compressed assemblies using a HTTP request and decompressing them on the client for hosts that don't support fetching compressed contents from the server
  • Aliasing resources to a different name by redirecting each fetch request to the new name

cc: @javiercn @SteveSandersonMS

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions