Skip to content

fix: blazor <AbpStyles>/<AbpScripts> lose PathBase for WebAssembly files#25340

Merged
maliming merged 2 commits intorel-10.2from
maliming/fix-blazor-bundle-webassembly-files
Apr 29, 2026
Merged

fix: blazor <AbpStyles>/<AbpScripts> lose PathBase for WebAssembly files#25340
maliming merged 2 commits intorel-10.2from
maliming/fix-blazor-bundle-webassembly-files

Conversation

@maliming
Copy link
Copy Markdown
Member

Follow-up to #25336.

WebAssemblyStyleFiles / WebAssemblyScriptFiles (the WebAssembly switch / append branches) skipped IComponentBundleUrlBuilder, so leading-/ URLs were rendered as-is and dropped the PathBase under a virtual application. Resolve them through the builder, same as the prerender bundle files.

…mblyStyleFiles`/`WebAssemblyScriptFiles`

Resolve `WebAssemblyStyleFiles` and `WebAssemblyScriptFiles` through `IComponentBundleUrlBuilder` so they receive the same `PathBase` prefixing as the prerender bundle files.
Copilot AI review requested due to automatic review settings April 29, 2026 08:19
Copy link
Copy Markdown
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

Follow-up to #25336 to ensure Blazor <AbpStyles> / <AbpScripts> also preserve PathBase when switching/appending WebAssembly-specific files, by routing WebAssemblyStyleFiles / WebAssemblyScriptFiles through IComponentBundleUrlBuilder like prerender bundle files.

Changes:

  • Resolve WebAssemblyStyleFiles via ResolveAsync(...) when appending to prerendered styles.
  • Resolve WebAssemblyStyleFiles via ResolveAsync(...) when switching to WebAssembly styles after render.
  • Resolve WebAssemblyScriptFiles via ResolveAsync(...) when running in the browser.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor Routes WebAssembly style file URLs through IComponentBundleUrlBuilder so leading-/ paths don’t drop PathBase.
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor Routes WebAssembly script file URLs through IComponentBundleUrlBuilder for the same PathBase correctness.

Copy link
Copy Markdown
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

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

@maliming maliming requested a review from EngincanV April 29, 2026 09:01
@maliming maliming merged commit dbf3d60 into rel-10.2 Apr 29, 2026
7 checks passed
@maliming maliming deleted the maliming/fix-blazor-bundle-webassembly-files branch April 29, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants