Skip to content

Conversation

@MackinnonBuck
Copy link
Member

Fix HeadOutlet getting trimmed away for Blazor WebAssembly prerendered apps after publish
The HeadOutlet component was getting trimmed away in published ASP.NET Core hosted Blazor WebAssembly prerendered apps. This caused <HeadContent> and <PageTitle> to take effect only during prerendering.

PR Description
Added a [DynamicDependency] on WebAssemblyHostBuilder.CreateDefault to prevent HeadOutlet from getting trimmed away.

Fixes #35363

@MackinnonBuck MackinnonBuck requested a review from a team as a code owner August 17, 2021 17:29
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Aug 17, 2021
@SteveSandersonMS SteveSandersonMS self-requested a review August 23, 2021 14:51
Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

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

Looks great - thanks for sorting this out!

@MackinnonBuck MackinnonBuck merged commit cdf9caa into main Aug 23, 2021
@MackinnonBuck MackinnonBuck deleted the t-mbuck/fix-head-outlet-trimming branch August 23, 2021 23:41
@ghost ghost added this to the 7.0-preview1 milestone Aug 23, 2021
MackinnonBuck added a commit that referenced this pull request Aug 24, 2021
@MackinnonBuck
Copy link
Member Author

/backport to release/6.0

@ghost
Copy link

ghost commented Aug 24, 2021

Hi @MackinnonBuck. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@MackinnonBuck backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Update WebAssemblyHostBuilder.cs
Applying: Added comment
Applying: Added E2E test and exception message
Using index info to reconstruct a base tree...
M	AspNetCore.sln
M	src/Components/Components.slnf
Falling back to patching base and 3-way merge...
Auto-merging src/Components/Components.slnf
Auto-merging AspNetCore.sln
CONFLICT (content): Merge conflict in AspNetCore.sln
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Added E2E test and exception message
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blazor: PreRender WASM: PageTitle/HeadContent not updated on publish

4 participants