[release/8.0] [browser] Update browser template to use Wasm SDK (#91046)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 30 Aug 2023 19:43:07 +0000 (12:43 -0700)
committerGitHub <noreply@github.com>
Wed, 30 Aug 2023 19:43:07 +0000 (12:43 -0700)
commit028b380d67b891a6f45d02d633145a0c7b58a857
tree325507a8e993083116c9564f6cf905b7bd47880e
parente018fb7c957f1552aa967fe9a4c3ce715df6ed43
[release/8.0] [browser] Update browser template to use Wasm SDK (#91046)

* Use WasmSdk in browser template

* Remove default html-path

* Use wwwroot when looking for main.js in template for replacement

* Temporarily remove WasmRuntimeAssetsLocation from WBT because WasmSDK doesn't support it yet

* Integrate console log forward into DevServer

* Replace UseRouter

* Use next middleware only if it's not console

* CancellationTokenSource on CancelKeyPress

* Address feedback from initial DevServer integration

* Update src/mono/wasm/host/BrowserHost.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Remove debugging code

* Fix WBT

* Fix starting outside of project directory

* Support WasmRuntimeAssetsLocation in Wasm SDK

* Revert "Support WasmRuntimeAssetsLocation in Wasm SDK"

* Active issue for WasmRuntimeAssetsLocation

* Feedback

---------

Co-authored-by: Marek FiĊĦera <mara@neptuo.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
13 files changed:
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets
src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs
src/mono/wasm/Wasm.Build.Tests/WasmTemplateTestBase.cs
src/mono/wasm/host/BrowserHost.cs
src/mono/wasm/host/DevServer/DevServer.cs
src/mono/wasm/host/DevServer/DevServerStartup.cs
src/mono/wasm/host/Program.cs
src/mono/wasm/templates/templates/browser/README.md [deleted file]
src/mono/wasm/templates/templates/browser/browser.0.csproj
src/mono/wasm/templates/templates/browser/runtimeconfig.template.json
src/mono/wasm/templates/templates/browser/wwwroot/index.html [moved from src/mono/wasm/templates/templates/browser/index.html with 100% similarity]
src/mono/wasm/templates/templates/browser/wwwroot/main.js [moved from src/mono/wasm/templates/templates/browser/main.js with 100% similarity]