Friday, 17 March 2023

Blazor WASM crashes when importing a JS module that contains imports

I import the module via

await JSHost.ImportAsync("Firebase", "/js/Firebase.js");

If the js file only contains export funcion blabla(){return "bla";} it works as expected. But I'm connecting to firebase, and I need to import some stuff like

import { initializeApp } from "https://www.gstatic.com/firebasejs/9.15.0/firebase-app.js";

export function blabla(){
   return "bla";
}
/*etc*/

The very moment I include the import in my module, the ImportAsync method crashes the system, and it exits with error code 0xfffffff and no further explanation.

What's the expected way to include this kind of JS?

NOTE: If I run it with no debugger (Ctrl+F5 instead of just F5) It does work, it does not shut down. But obviously, I need to develop with debug capabilities.



from Blazor WASM crashes when importing a JS module that contains imports

No comments:

Post a Comment