Open MackinnonBuck opened 10 months ago
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
Thanks for contacting us.
We're moving this issue to the .NET 9 Planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.
@MackinnonBuck can you please follow the https://aka.ms/aspnet/processes/help-wanted process to turn this into a help wanted
issue? Thanks!
See https://github.com/dotnet/aspnetcore/issues/51611#issue-1959832122
We can add one additional property to CircuitStartOptions
and WebAssemblyStartOptions
each:
export interface CircuitStartOptions {
// <existing members>
// Exists for compatibility with WebStartOptions.
circuit?: CircuitStartOptions;
}
export interface WebAssemblyStartOptions {
// <existing members>
// Exists for compatibility with WebStartOptions.
webAssembly?: WebAssemblyStartOptions;
}
Then we'll update Boot.Server.ts
and Boot.WebAssembly.ts
to "normalize" the options. Without loss of generality between circuit and WebAssembly options, something like this should work:
async function boot(options?: Partial<WebAssemblyStartOptions>): Promise<void> {
// ...
const normalizedOptions = options?.webAssembly ?? options ?? {};
setWebAssemblyOptions(Promise.resolve(normalizedOptions));
}
This approach always prioritizes the "nested" options over top-level options. I don't anticipate there being any cases where nested and top-level options are specified on the same object, so the simplicity of this approach seems preferable over introducing more complicated option merging semantics.
CircuitStartOptions.ts
WebAssemblyStartOptions.ts
Boot.Server.ts
Boot.WebAssembly.ts
Looks like this issue has been identified as a candidate for community contribution. If you're considering sending a PR for this issue, look for the Summary Comment
link in the issue description. That comment has been left by an engineer on our team to help you get started with handling this issue. You can learn more about our Help Wanted process here
Hello, I'm starting to get my feet wet in open source development, mind if I try my hand at this issue?
Hi there, @MackinnonBuck your link on How to build the repo is broken. Can you please provide a valid one?
Hello,
I created a PR that I believe will resolve this issue, can somebody please take a look if it is valid?
Problem
When a Blazor app uses
blazor.web.js
, the options object passed toBlazor.start()
has the following format:However, when using
blazor.server.js
orblazor.webassembly.js
, runtime-specific options are specified as top-level properties on the options object. So, for example, if you're usingblazor.webassembly.js
and you attempt to customize the loading of boot resources like this:...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
andblazor.server.js
to accept the options format used byblazor.web.js
.Summary Comment: https://github.com/dotnet/aspnetcore/issues/51611#issuecomment-1866955885