I am facing an issue with SPFx 1.22.x (Heft-based toolchain) running inside a Docker container.
The web part is created successfully inside the container workspace using:
yo @microsoft/sharepoint
I selected a React-based web part, and the project builds successfully without any errors.
However, the live reload / file watching is not working.
What happens:
-
When I modify any web part file, the terminal does not detect file changes
-
The SharePoint Workbench does not reload or reflect updates
-
Live reload never triggers
What works correctly:
-
The web part builds successfully
-
The debug manifest loads correctly
-
I can access the manifest here:
https://localhost:4321/temp/build/manifests.js
The web part also loads in the SharePoint Workbench using:
https://<tenant>.sharepoint.com/_layouts/15/workbench.aspx?debugManifestsFile=https://localhost:4321/temp/build/manifests.js&debug=true&noredir=true
But file changes are not detected, so live reload never happens.
Configuration change I tried
I updated config/serve.json:
{
"hostname": "0.0.0.0",
"port": 4321,
"https": true
}
But this did not resolve the issue.
Important comparison
If I use SPFx 1.21 (Gulp-based toolchain) with spfx-fast-serve, everything works perfectly:
But with SPFx 1.22.x (Heft-based toolchain) inside Docker:
Environment
Question
Has anyone successfully configured SPFx 1.22.x (Heft) live reload inside a Docker container?
Is there any known issue with:
-
file watching inside Docker
-
Heft build-watch --serve
-
container volume mounting
-
or LiveReload with SPFx 1.22?
Any guidance or working configuration would be greatly appreciated. I have been trying to resolve this for the past week but have not been able to get live reload working inside Docker.
please make sure you comment first try in docker with setup spfx 1.22 then you realized what i stuck! (no direct ask to chatgpt first try then if you resolved this then comment here)