Azure / Azure/static-web-apps-cli
Hot reload staticwebapp.config.json changes when server is running
- Dominant language
- TypeScript
- Stars
- 668
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
We need to support hot reloading the `staticwebapp.config.json` file whenever it got edited, without restarting the server.
**Describe alternatives you've considered**
Currently, users need to kill the server and restart it so their changes get applied.
**Additional context**
Currently, we read and cache the `staticwebapp.config.json` when starting the server:
https://github.com/Azure/static-web-apps-cli/blob/722616015d16059d697428bd44f143ad72857b02/src/msha/server.ts#L146-L154
An easy implementation would be to move the call to `await handleUserConfig(...)` inside:
https://github.com/Azure/static-web-apps-cli/blob/722616015d16059d697428bd44f143ad72857b02/src/msha/server.ts#L49-L51
Contributor guide
Assessment
This issue has not been assessed yet.