My Blazor WebAssembly standalone (not hosted) app works fine locally running in Visual Studio but when I deploy to a Windows server - IIS the app doesn't load within the browser and this is showing in the console:

I also see in the network panel it is making a request to the server for: https://{myDomain}/_framework/undefined A file that doesn't exist, so it's just returning the index.html content.
I have tried deleting everything and deploying a 2nd time and also tried restarting the website in IIS but it doesn't help.
