Skip to content
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

[browser] Pass configured config name to loadBootResource #113210

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

maraf
Copy link
Member

@maraf maraf commented Mar 6, 2025

Before this change, we were always passing "blazor.boot.json" to as name to loadBootResource. If someone uses it to construct the URL, like aspnetcore tests, it creates an incorrect URL.

Contributes to dotnet/aspnetcore#59456

@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Mar 6, 2025
@maraf maraf added this to the 10.0.0 milestone Mar 6, 2025
@maraf maraf self-assigned this Mar 6, 2025
@Copilot Copilot bot review requested due to automatic review settings March 6, 2025 10:37
@maraf maraf requested review from lewing and pavelsavara as code owners March 6, 2025 10:37
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR changes the way the boot configuration file is resolved by passing the configured config name to loadBootResource instead of a hard-coded value. Key changes include updating the fallback config path, passing module.configSrc and its resolved URL to loadBootResource, and switching from using defaultConfigSrc to defaultConfigUrl when checking for JSON resources.

Reviewed Changes

File Description
src/mono/browser/runtime/loader/config.ts Update fallback configuration value and resource loading functions to use the configured config name and corresponding URL

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/mono/browser/runtime/loader/config.ts:246

  • The fallback configuration value has been changed from "./blazor.boot.json" to "blazor.boot.json". Please verify that removing the './' prefix is intentional, as it might affect how the relative path is resolved.
?? "blazor.boot.json";
@maraf maraf requested a review from javiercn March 6, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants