Skip to content

[Blazor] Pass environment to runtime config only when defined #62418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 20, 2025

Conversation

maraf
Copy link
Member

@maraf maraf commented Jun 19, 2025

It is a regression from merging boot config into dotnet.js. After that change, boot config is always loaded "immediately" & options passed from blazor are applied after it. In general, this is good as it allows to override default build values with those provided by user. We just need to be careful about default (null or undefined) values.

We have an E2E test, but on CI it fallbacks to Production value, which is also a default value. I'm changing the test to have a value of Staging when running on CI and Development when running in debug.

Fixes #62362

@maraf maraf self-assigned this Jun 19, 2025
@maraf maraf added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Jun 19, 2025
@maraf maraf added this to the 10.0-preview7 milestone Jun 20, 2025
@maraf maraf marked this pull request as ready for review June 20, 2025 07:17
@maraf maraf requested a review from a team as a code owner June 20, 2025 07:17
@maraf maraf enabled auto-merge (squash) June 20, 2025 11:56
@maraf
Copy link
Member Author

maraf commented Jun 20, 2025

/ba-g Failures are not related

@maraf maraf merged commit 61984fd into dotnet:main Jun 20, 2025
25 of 27 checks passed
@maraf
Copy link
Member Author

maraf commented Jun 20, 2025

/backport to release/10.0-preview6

Copy link
Contributor

Started backporting to release/10.0-preview6: https://github.com/dotnet/aspnetcore/actions/runs/15781007622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[.net 10 Preview 5] Blazor wasm stand-alone app HostEnvironment is "Production" in development mode
2 participants