Fix blank screen: rename stores to .svelte.ts for rune support
All checks were successful
Release / Bump version and tag (push) Successful in 7s
All checks were successful
Release / Bump version and tag (push) Successful in 7s
Svelte 5 runes ($state, $derived, $effect) are only compiled in .svelte and .svelte.ts files. The stores used runes in plain .ts files, which meant $state was treated as an undefined function at runtime, crashing the JS before anything rendered. - Renamed backend.ts -> backend.svelte.ts - Renamed config.ts -> config.svelte.ts - Renamed transcriptions.ts -> transcriptions.svelte.ts - Added .svelte.ts to Vite resolve extensions - Added missing obsUrl/syncUrl getters to backend store Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -255,6 +255,14 @@ export const backendStore = {
|
||||
get wsUrl() {
|
||||
return `ws://localhost:${state.port}/ws/control`;
|
||||
},
|
||||
get obsUrl() {
|
||||
// OBS display runs on the web server port (one below the API port)
|
||||
const obsPort = state.port > 0 ? state.port - 1 : 8080;
|
||||
return `http://localhost:${obsPort}`;
|
||||
},
|
||||
get syncUrl() {
|
||||
return "";
|
||||
},
|
||||
setPort,
|
||||
connect: connectWebSocket,
|
||||
disconnect,
|
||||
@@ -10,6 +10,7 @@ export default defineConfig({
|
||||
alias: {
|
||||
$lib: path.resolve("./src/lib"),
|
||||
},
|
||||
extensions: [".svelte.ts", ".ts", ".svelte", ".js", ".mjs", ".mts"],
|
||||
},
|
||||
server: {
|
||||
port: 1420,
|
||||
|
||||
Reference in New Issue
Block a user