You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a [framework bug in .NET 8 and 9 (`dotnet/aspnetcore` #54049)](https://github.com/dotnet/aspnetcore/issues/54049), the Blazor script must be manually started when `beforeWebAssemblyStart(options, extensions)` or `afterWebAssemblyStarted(blazor)` are called. If the server app doesn't already start Blazor manually with a WebAssembly (`webAssembly: {...}`) configuration, update the `App` component in the server project with the following.
135
+
136
+
In `Components/App.razor`, remove the existing Blazor `<script>` tag:
137
+
138
+
```diff
139
+
-<script src="_framework/blazor.web.js"></script>
140
+
```
141
+
142
+
Replace the `<script>` tag with the following markup that starts Blazor manually with a WebAssembly (`webAssembly: {...}`) configuration:
@@ -700,13 +728,56 @@ In `Layout/MainLayout.razor`:
700
728
701
729
*This scenario applies to global Interactive WebAssembly rendering without prerendering (`@rendermode="new InteractiveWebAssemblyRenderMode(prerender: false)"` on the `HeadOutlet` and `Routes` components in the `App` component).*
702
730
703
-
XXXXXXXXXXXXXXXXXXX
731
+
Add a [JavaScript initializer](#javascript-initializers) to the app. In the following JavaScript module file name example, the `{ASSEMBLY NAME}` placeholder is the assembly name of the server project (for example, `BlazorSample`). The `wwwroot` folder where the module is placed is the `wwwroot` folder in the server-side project, not the `.Client` project.
732
+
733
+
The following example uses a [`progress`](https://developer.mozilla.org/docs/Web/HTML/Element/progress) indicator that doesn't indicate specific progress as [client-side boot resources are delivered to the client](#load-client-side-boot-resources), but it serves as a general approach for further development if you want the progress indicator to show the actual progress.
734
+
735
+
`wwwroot/{ASSEMBLY NAME}.lib.module.js`:
704
736
705
-
Awaiting further guidance from Javier to confirm that
706
-
a JS initiazlier or `Blazor.start()` approach is the
Due to a [framework bug in .NET 8 and 9 (`dotnet/aspnetcore`#54049)](https://github.com/dotnet/aspnetcore/issues/54049), the Blazor script must be manually started. If the server app doesn't already start Blazor manually with a WebAssembly (`webAssembly: {...}`) configuration, update the `App` component in the server project with the following.
758
+
759
+
In `Components/App.razor`, remove the existing Blazor `<script>` tag:
If you notice a short delay between the loading indicator removal and the first page render, you can guarantee removal of the indicator after rendering by calling for indicator removal in the `MainLayout` component's [`OnAfterRenderAsync` lifecycle method](xref:blazor/components/lifecycle#after-component-render-onafterrenderasync). For more information and a code example, see [Document an approach for a loading indicator that works with global Interactive WebAssembly without prerendering (`dotnet/AspNetCore.Docs`#35111)](https://github.com/dotnet/AspNetCore.Docs/issues/35111#issuecomment-2778796998).
0 commit comments