-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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). |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I'm ooo next week. What I see here is already great. |
I think this PR can fix dotnet/aspnetcore#61577 too |
Addresses #35602
Addresses #34437
Fixes #35696
Fixes #35632
Fixes #35631
Fixes #35630
Fixes #35669
Fixes #35620
NOTES
Internal previews
Toggle expand/collapse