-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Description
Pavel, I'm working on doc updates for the Webcil (.wasm) .NET assembly packing format for .NET 8 preview docs.
One of the JS import/export examples calls getAssemblyExports on the app's assembly, so I was checking that example. While doing so, I noticed an error when running the example in a Pre5 test app.
The section is located at ...
When the component is accessed, it works as described ...
When that error is checked, it appears as ...
blazor.webassembly.js:1 Error: Assert failed: ES6 module CallDotNet1 was not imported yet, please call JSHost.ImportAsync() first.
JSHost.ImportAsync() is called (and ultimately works) ...
protected override async Task OnInitializedAsync()
{
await JSHost.ImportAsync("CallDotNet1",
"../Pages/CallDotNet1.razor.js");
}Cross-reference: https://github.com/guardrex/BlazorWASM80Pre5WebcilCheck/blob/main/Pages/CallDotNet1.razor#L16-L17
Reproduction Steps
I put up a sample app with that example ...
https://github.com/guardrex/BlazorWASM80Pre5WebcilCheck
Expected behavior
No module load error in the console.
Actual behavior
Regression?
AFAIK, there was no error when we put the guidance up.
Known Workarounds
None
Configuration
- .NET 8 Preview 5
- Windows 11 Pro
- x64
- Don't know if it's specific to this config.
- MS Edge Version 114.0.1823.43 (Official build) (64-bit)
Other information
None

