pnp / docker-spfx

Docker images for working with SharePoint Framework
https://hub.docker.com/r/m365pnp/spfx
MIT License
116 stars 48 forks source link

Refreshing Page on Source Change is not Working #69

Open shurick81 opened 2 years ago

shurick81 commented 2 years ago

PS - working WSL - working Docker in PS - not reacting on file changes Docker in WSL - not reacting on file changes

shurick81 commented 2 years ago

When I run in Docker under WSL console, it actually reacts on file changes, it rebuilds the assets:

[23:10:17] Starting '_runWatch'...
[23:10:17] Starting gulp
[23:10:17] Starting subtask 'pre-copy'...
[23:10:17] Finished subtask 'pre-copy' after 89 μs
[23:10:17] Starting subtask 'copy-static-assets'...
[23:10:17] Starting subtask 'sass'...

However, the browser is not reloading the page. I guess it happens because process inside docker cannot control browser on the host.

shurick81 commented 2 years ago

Stefan Bauer is suggesting how to make it working in SPFx: https://n8d.at/make-livereload-on-sharepoint-online-possible

shurick81 commented 2 years ago

Now I realized that I measured the result of these 4 ways of running SPFx in different ways, so now I need to specify and correct:

PS - rebuilding the solution, requires registering localhost:35729/livereload.js?snipver=1 WSL - rebuilding the solution, requires registering localhost:35729/livereload.js?snipver=1 Docker in PS - not reacting on file changes Docker in WSL - rebuilding the solution, requires registering localhost:35729/livereload.js?snipver=1