-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[browser] Add application environment to boot config #113164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces functionality for defining and overriding the application environment across boot configuration, MSBuild, and JavaScript API. Key changes include adding a new MSBuild property and associated task changes, updating the JavaScript boot configuration loader to prefer the user-defined environment, and extending tests to cover the new behavior.
Reviewed Changes
File | Description |
---|---|
src/mono/wasm/Wasm.Build.Tests/AppSettingsTests.cs | Updates tests to validate environment selection based on publish/build and overrides from MSBuild/JavaScript. |
src/mono/browser/runtime/loader/config.ts | Updates boot config loading logic to prefer a user-defined application environment from the JavaScript API. |
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/BootJsonData.cs | Adds the applicationEnvironment property to the boot config data. |
src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Adjusts the call to set the application environment based on query parameters. |
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/GenerateWasmBootJson.cs | Integrates the new MSBuild ApplicationEnvironment property into the boot JSON generation. |
src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs | Refactors the test asset copying method to better handle unicode path handling on local systems. |
src/mono/wasm/testassets/WasmBasicTestApp/README.md | Updates the referenced test assets path in the documentation. |
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
/ba-g |
Contributes to dotnet/aspnetcore#59456