aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

[Blazor wasm] Use provided loadBootResource function to override how config is loaded

Open romansp opened this issue 3 years ago • 1 comments

[Blazor wasm] Use provided loadBootResource function to override how the config is loaded

  • [x] You've read the Contributor Guide and Code of Conduct.
  • [ ] You've included unit or integration tests for your change, where applicable.
  • [x] You've included inline docs for your change, where applicable.
  • [x] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Use "loadBootResource" function to override how the config is loaded.

Description

PR updates WebAssemblyConfigLoader.initAsync to use provided loadBootResource function from startOptions to override how the config is loaded in runtime. Allows loading config from a custom source, such as an external CDN. Providing similar behavior to loading of other boot resources.

I couldn't find any existing tests that cover current loadBootResource behavior for other resources. So, I didn't include any new tests. Though I see that JsInitializersTest.cs might be a good place for that? Let me know if these tests are expected and I will work on this too.

Fixes #43700.

romansp avatar Sep 14 '22 07:09 romansp

Thanks for your PR, @romansp. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

ghost avatar Sep 14 '22 07:09 ghost

/AzurePipelines run AspNetCore-ci

javiercn avatar Jan 19 '23 12:01 javiercn

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jan 19 '23 12:01 azure-pipelines[bot]