Skip to content

[Pre6] Blazor Preview 6 updates #35698

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Jul 2, 2025

Addresses #35602
Addresses #34437
Fixes #35696
Fixes #35632
Fixes #35631
Fixes #35630
Fixes #35669
Fixes #35620

NOTES

  • This still lacks the "Blazor Server state persistence" coverage, but I'll knock that out first thing Tuesday morning.
  • This still lacks passkey coverage, and I'm waiting on DR to respond on the What's New issue on how to address it this release.

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
aspnetcore/blazor/components/rendering.md aspnetcore/blazor/components/rendering
aspnetcore/blazor/forms/validation.md aspnetcore/blazor/forms/validation
aspnetcore/blazor/fundamentals/routing.md aspnetcore/blazor/fundamentals/routing
aspnetcore/blazor/host-and-deploy/index.md aspnetcore/blazor/host-and-deploy/index
aspnetcore/blazor/host-and-deploy/server/index.md aspnetcore/blazor/host-and-deploy/server/index
aspnetcore/blazor/host-and-deploy/webassembly/azure-static-web-apps.md aspnetcore/blazor/host-and-deploy/webassembly/azure-static-web-apps
aspnetcore/blazor/host-and-deploy/webassembly/bundle-caching-and-integrity-check-failures.md aspnetcore/blazor/host-and-deploy/webassembly/bundle-caching-and-integrity-check-failures
aspnetcore/blazor/host-and-deploy/webassembly/http-caching-issues.md aspnetcore/blazor/host-and-deploy/webassembly/http-caching-issues
aspnetcore/blazor/performance/index.md aspnetcore/blazor/performance/index
aspnetcore/blazor/performance/webassembly-browser-developer-tools-diagnostics.md aspnetcore/blazor/performance/webassembly-browser-developer-tools-diagnostics
aspnetcore/blazor/performance/webassembly-event-pipe-diagnostics.md aspnetcore/blazor/performance/webassembly-event-pipe-diagnostics
aspnetcore/blazor/webassembly-native-dependencies.md aspnetcore/blazor/webassembly-native-dependencies
aspnetcore/client-side/using-grunt.md aspnetcore/client-side/using-grunt
aspnetcore/log-mon/metrics/built-in.md aspnetcore/log-mon/metrics/built-in
aspnetcore/security/app-secrets.md aspnetcore/security/app-secrets

Copy link
Member

@pavelsavara pavelsavara left a comment

Choose a reason for hiding this comment

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

I reviewed diagnostics and it's looking great. Thank you so much.

@guardrex please note that dotnet/aspnetcore#62555 and dotnet/aspnetcore#62556 may lead to further renames.

> [!NOTE]
> Replacing the `files` plugin with `url`, all of the app's JavaScript files, including the Blazor-WebAssembly runtime (base64 encoded in the JavaScript), are bundled into the output. The size of the file is significantly larger (for example, 300% larger) than when the files are curated with the `files` plugin, so we don't recommend using the `url` plugin as a general practice when producing bundler-friendly output for JavaScript bundler processing.

For a demonstration sample app, see the [.NET on WASM in a React component sample (`maraf/dotnet-wasm-react` GitHub repository)](https://github.com/maraf/dotnet-wasm-react).
Copy link
Member

Choose a reason for hiding this comment

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

Note that this application was not updated by @maraf yet

Copy link
Member

Choose a reason for hiding this comment

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

@maraf I wonder if sample also with Blazor would be possible? Would it be only possible for self-hosted wasm ? Or for asp hosted as well ? How would the dev-loop look like with 3rd party bundler in the middle ?

(I'm just asking those questions, but they are not blocker for this documentation PR)

Copy link
Collaborator Author

@guardrex guardrex Jul 7, 2025

Choose a reason for hiding this comment

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

@maraf ... Whatever your reply to those ❓, please let me know exactly what to add or change in the coverage from your answers.

WRT the sample app (if we keep Line 109), the latest commit comments it out for now. I'll circle around later to surface Line 109. It's tracked, so it won't get lost for GA.


The output isn't directly runnable in the browser, but it can be consumed by JavaScript tools to bundle JavaScript files with the rest of the developer-supplied scripts.

The [`package.json`](https://github.com/dotnet/runtime/blob/main/src/mono/wasm/testassets/JavascriptBundlers/package.json) and [`rollup.config.mjs`](https://github.com/dotnet/runtime/blob/main/src/mono/wasm/testassets/JavascriptBundlers/rollup.config.mjs) files in the `dotnet/runtime` GitHub repository contain a demonstration of bundler-friendly output for an npm project with [Rollup](https://rollupjs.org/). Rollup can compile all of the app's JavaScript files into a single file and handle additional .NET files by copying them to the npm build output.
Copy link
Member

Choose a reason for hiding this comment

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

Note we want to stay light on topic of 3rd party bundlers, rather than hand-hold developers thru this complex topic and own the related problems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Very well, but I need specific change guidance from @maraf on this. Please strike or change the guidance with GH suggestion(s) on the diff.

@pavelsavara

This comment was marked as resolved.

@guardrex

This comment was marked as resolved.

@pavelsavara
Copy link
Member

I'm ooo next week. What I see here is already great.

@pavelsavara
Copy link
Member

I think this PR can fix dotnet/aspnetcore#61577 too

@guardrex guardrex marked this pull request as ready for review July 7, 2025 15:43
Copilot

This comment was marked as outdated.

@guardrex guardrex requested a review from Copilot July 7, 2025 16:19
Copilot

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants