Open
Description
Problem
When a Blazor app uses blazor.web.js
, the options object passed to Blazor.start()
has the following format:
Blazor.start({
ssr: { /* ... */ },
circuit: { /* ... */ },
webAssembly: { /* ... */ },
});
However, when using blazor.server.js
or blazor.webassembly.js
, runtime-specific options are specified as top-level properties on the options object. So, for example, if you're using blazor.webassembly.js
and you attempt to customize the loading of boot resources like this:
Blazor.start({
webAssembly: {
loadBootResource: function (/* ... */) {
// ...
},
},
});
...then it will just silently "not work". This could create a pit of failure for customers who see examples in docs using the blazor.web.js
options format but are writing a Blazor WebAssembly standalone app, for example.
Solution
We should update blazor.webassembly.js
and blazor.server.js
to accept the options format used by blazor.web.js
.
Summary Comment: #51611 (comment)
Metadata
Metadata
Assignees
Labels
Handling this issue should be relatively simple to tackleWork that is important, but not critical for the releaseIncludes: Blazor, Razor ComponentsThis issue represents an ask for new feature or an enhancement to an existing oneGood for newcomers.Up for grabs. We would accept a PR to help resolve this issue