From 30f450b0d13e2b2bd27b92103fc1e141833ccbf1 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 2 Jun 2026 19:38:22 +0200 Subject: [PATCH] build(frontend): register $mocks in kit.alias for tsconfig resolution The vite resolve.alias (added for the client + coverage runs) does not reach svelte-check, which resolves paths through the generated tsconfig. Declaring $mocks in kit.alias feeds both the generated tsconfig paths and the sveltekit() vite plugin, so editor/type-check resolve it too. Part of #560. Co-Authored-By: Claude Opus 4.8 --- frontend/svelte.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index e94e293c..3ca6f79a 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -8,6 +8,11 @@ const config = { preprocess: vitePreprocess(), kit: { adapter: adapter(), + // $mocks resolves shared browser-test mock bodies (src/__mocks__). Declared here + // so svelte-check/tsconfig and both vite configs resolve it. See ADR-012. + alias: { + $mocks: 'src/__mocks__' + }, prerender: { entries: ['/hilfe/transkription'], // Disable crawl: by default SvelteKit follows nav links from