From c22e911d1ea8236f8b886bbded11aec3b22387f3 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 23 Mar 2026 10:34:37 +0000 Subject: [PATCH] fix(websiteserver): only enable file watching when reload injection is active --- changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- ts/utilityservers/classes.websiteserver.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 1861986..71a5f2a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-03-23 - 8.4.3 - fix(websiteserver) +only enable file watching when reload injection is active + +- Updates WebsiteServer to disable watch mode when injectReload is turned off, even if serveDir is configured. +- Keeps development watching behavior aligned with the reload feature toggle to avoid unnecessary file watching. + ## 2026-03-03 - 8.4.2 - fix(ts_web_inject) improve ReloadChecker resilience and TypedSocket handling diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 4f77c48..533b077 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@api.global/typedserver', - version: '8.4.2', + version: '8.4.3', description: 'A TypeScript-based project for easy serving of static files with support for live reloading, compression, and typed requests.' } diff --git a/ts/utilityservers/classes.websiteserver.ts b/ts/utilityservers/classes.websiteserver.ts index e13b5cd..a8a43cb 100644 --- a/ts/utilityservers/classes.websiteserver.ts +++ b/ts/utilityservers/classes.websiteserver.ts @@ -67,7 +67,7 @@ export class UtilityWebsiteServer { // Development features injectReload: this.options.injectReload ?? true, - watch: !!this.options.serveDir, + watch: !!(this.options.serveDir && (this.options.injectReload ?? true)), noCache: this.options.noCache ?? true, // SPA support (enabled by default for modern web apps)