Skip to content

Conversation

@maraf
Copy link
Member

@maraf maraf commented Mar 18, 2025

  • Update browserwasm template to include placeholders and MSBuild settings to enable override of HTML files during build.
  • Wasm.Build.Tests now expects that dotnet.js is fingerprinted.

Contributes to dotnet/aspnetcore#60536

@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Mar 18, 2025
@maraf maraf added this to the 10.0.0 milestone Mar 18, 2025
@maraf maraf self-assigned this Mar 18, 2025
@maraf maraf marked this pull request as ready for review March 26, 2025 11:26
Copilot AI review requested due to automatic review settings March 26, 2025 11:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the browser wasm template to support HTML overrides during build and adjusts the fingerprint expectations for specific dotnet files. Key changes include:

  • Updating the fingerprint flag for "dotnet.js" and the boot config file in WasmSdkBasedProjectProvider.cs.
  • Introducing a new helper method GetBootConfigPath in ProjectProviderBase.cs to locate the fingerprinted boot configuration file.

Reviewed Changes

Copilot reviewed 2 out of 12 changed files in this pull request and generated 1 comment.

File Description
src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs Updated boolean flags to enable fingerprinting for dotnet.js and boot config file.
src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs Refactored boot config file lookup by introducing GetBootConfigPath and updating its usage.
Files not reviewed (10)
  • src/mono/wasm/templates/templates/browser/browser.0.csproj: Language not supported
  • src/mono/wasm/templates/templates/browser/wwwroot/index.html: Language not supported
  • src/mono/wasm/testassets/BlazorBasicTestApp/App/BlazorBasicTestApp.csproj: Language not supported
  • src/mono/wasm/testassets/BlazorBasicTestApp/App/wwwroot/index.html: Language not supported
  • src/mono/wasm/testassets/WasmBasicTestApp/App/WasmBasicTestApp.csproj: Language not supported
  • src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/index.html: Language not supported
  • src/mono/wasm/testassets/WasmOnAspNetCore/BlazorClient/BlazorClient.csproj: Language not supported
  • src/mono/wasm/testassets/WasmOnAspNetCore/BlazorClient/wwwroot/index.html: Language not supported
  • src/mono/wasm/testassets/WasmOnAspNetCore/WasmBrowserClient/WasmBrowserClient.csproj: Language not supported
  • src/mono/wasm/testassets/WasmOnAspNetCore/WasmBrowserClient/wwwroot/index.html: Language not supported
Comments suppressed due to low confidence (1)

src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs:512

  • The GetBootConfigPath method does not return a value. Please add an appropriate 'return bootJsonPath;' statement before the method concludes.
}

@maraf maraf changed the title [browser] Use WriteImportMapToHtml=true in browser template [browser] Use OverrideHtmlAssetPlaceholders=true in browser template Apr 9, 2025
@maraf maraf requested a review from akoeplinger as a code owner April 21, 2025 08:34
@maraf maraf merged commit 628747e into dotnet:main Apr 23, 2025
26 checks passed
@maraf maraf deleted the BrowserWriteImportMapToHtml branch April 23, 2025 05:08
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants