Azure / Azure/static-web-apps-cli

Hot reload staticwebapp.config.json changes when server is running

Open
#264 5 comments 2 reactions 0 assignees View on GitHub
priority: medium (P1) scope: cli type: enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.