Skip to content

Fix build failure when prerendering dynamic routes - #4

Open
77wisher77 wants to merge 1 commit into
XurxoMF:mainfrom
77wisher77:fix/prerender-runtime-routes
Open

Fix build failure when prerendering dynamic routes#4
77wisher77 wants to merge 1 commit into
XurxoMF:mainfrom
77wisher77:fix/prerender-runtime-routes

Conversation

@77wisher77

@77wisher77 77wisher77 commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Change the /src/routes/+layout.ts prerender option from true to "auto".

Environment

  • Arch Linux (7.1.5-arch1-1) / EndeavourOS
  • Bun 1.3.14
  • NodeJs 24.13.0
  • SvelteKit 2.69.1
  • Tauri CLI 2.11.4
  • rustory branch/commit main/d1f086a14cede25408b6df30705f5a24c753d551

Problem

The root prerender = true setting is inherited by these dynamic routes:

  • /vs-instances/[slug]
  • /vs-instances/[slug]/edit
  • /vs-mods/[slug]

These routes require parameterized destinations that are determined at runtime,
so SvelteKit cannot discover concrete paths during its prerender crawl.
Consequently, bun run tauri build --no-bundle fails with
handleUnseenRoutes errors.

I have attached a full, failed build log for inspection.

Solution

prerender = "auto" preserves prerendering for routes that can be discovered
while allowing the static SPA fallback to serve runtime parameter routes. SSR
remains disabled, so this matches the existing Tauri/adapter-static SPA
configuration without adding build-time data fetching or placeholder slugs.

Validation

  • bun install --frozen-lockfile
  • bun run check
  • bun run lint
  • bun run tauri build --no-bundle
  • "Created" a local Vintage Story instance and viewed it in the list of instances
  • Open a mod detail page from the mods list
  • Installed a mod into an instance

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant