fix(build): add prerender entry for /hilfe/transkription
The SvelteKit prerender crawler cannot reach this route because hooks.server.ts redirects all non-public paths to /login before the crawler follows links. Explicitly listing the route in kit.prerender.entries tells SvelteKit to render it directly without crawling. Also removes a misleading comment that claimed the auth hook guards prerendered static files — it does not. Prerendered HTML is served as a static file by the reverse proxy; hooks.server.ts only runs for SSR requests. Closes #472 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1 @@
|
||||
// Safe: handleAuth in hooks.server.ts redirects unauthenticated requests
|
||||
// before prerendered HTML is visible.
|
||||
export const prerender = true;
|
||||
|
||||
@@ -6,7 +6,10 @@ const config = {
|
||||
// Consult https://svelte.dev/docs/kit/integrations
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
kit: { adapter: adapter() }
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
prerender: { entries: ['/hilfe/transkription'] }
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user