From e68e64f7ed507c4c0e3d5239213054c8c864b5df Mon Sep 17 00:00:00 2001 From: Martin Jensen Date: Sat, 18 Apr 2026 16:38:14 +0200 Subject: [PATCH] Add live reload for development - Switch dev server from serve to browser-sync with polling enabled - Add client-side ETag polling script to index.html (localhost-only) as a reliable fallback for environments where browser-sync file watching does not fire native fs events Co-Authored-By: Claude Sonnet 4.6 --- .claude/launch.json | 2 +- index.html | 13 +++++++++++++ package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.claude/launch.json b/.claude/launch.json index 5ac2b32..5c7e3ae 100644 --- a/.claude/launch.json +++ b/.claude/launch.json @@ -4,7 +4,7 @@ { "name": "hidden-gems", "runtimeExecutable": "npx", - "runtimeArgs": ["serve", ".", "--listen", "8000"], + "runtimeArgs": ["browser-sync", "start", "--server", "--port", "8000", "--files", "**", "--no-open", "--watchOptions.usePolling=true", "--watchOptions.interval=500"], "port": 8000, "autoPort": false } diff --git a/index.html b/index.html index 98024bb..f736425 100644 --- a/index.html +++ b/index.html @@ -1467,5 +1467,18 @@

Hidden Gems

initMap(); + diff --git a/package.json b/package.json index 90d29a4..2fc51f6 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,6 @@ "name": "hidden-gems", "version": "1.0.0", "scripts": { - "start": "npx serve . --listen 8000" + "start": "npx browser-sync start --server --port 8000 --files '**' --no-open --watchOptions.usePolling=true --watchOptions.interval=500" } }