From 660a4803177479a3da60db50520e345464d9d832 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 8 Dec 2025 12:31:38 +0000 Subject: [PATCH] fix(element): Enable SPA fallback in element dev server --- changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- ts/tswatch.classes.tswatch.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index ca87cb8..4f21d1c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-12-08 - 2.3.1 - fix(element) +Enable SPA fallback in element dev server + +- Add spaFallback: true to the TypedServer configuration used in element mode. +- Improves developer experience for single-page apps by serving the index file for unknown routes during development and supporting client-side routing. + ## 2025-12-08 - 2.3.0 - feat(typedserver) Enable compression for element development server and update @api.global/typedserver dependency diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 195f625..a99ae8f 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tswatch', - version: '2.3.0', + version: '2.3.1', description: 'A development tool for automatically watching and re-compiling TypeScript projects upon detecting file changes, enhancing developer workflows.' } diff --git a/ts/tswatch.classes.tswatch.ts b/ts/tswatch.classes.tswatch.ts index 6c06599..399904b 100644 --- a/ts/tswatch.classes.tswatch.ts +++ b/ts/tswatch.classes.tswatch.ts @@ -72,6 +72,7 @@ export class TsWatch { serveDir: plugins.path.join(paths.cwd, './dist_watch/'), port: 3002, compression: true, + spaFallback: true, }); const bundleAndReloadElement = async () => {