From 3b745cf0681eb50c0a4f785ae0718996bcd22360 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Fri, 30 Jan 2026 16:12:44 +0100 Subject: [PATCH] fix(matrix-web): disable SSR for app routes to fix $state error Svelte 5 runes in @manacore/shared-ui components were not being transformed correctly during SSR, causing "$state is not defined" errors. Since matrix-js-sdk requires browser APIs anyway, disabling SSR for the (app) routes is the correct solution. Co-Authored-By: Claude Opus 4.5 --- apps/matrix/apps/web/src/routes/(app)/+layout.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 apps/matrix/apps/web/src/routes/(app)/+layout.ts diff --git a/apps/matrix/apps/web/src/routes/(app)/+layout.ts b/apps/matrix/apps/web/src/routes/(app)/+layout.ts new file mode 100644 index 000000000..517d3e87a --- /dev/null +++ b/apps/matrix/apps/web/src/routes/(app)/+layout.ts @@ -0,0 +1,4 @@ +// Disable SSR for all (app) routes +// matrix-js-sdk requires browser APIs and shared-ui uses Svelte 5 runes +// that need client-side compilation +export const ssr = false;