Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Serve Tanstack Start + Fumadocs statically?#5478

Unanswered
jkinley asked this question inQ&A
Discussion options

Does anyone know how I can setup tanstack start with fumadocs so that I can run without a server? SSR is cool and all, but sometimes we just want a static site. I just want to be able to deploy to S3, Netlify, or Vercel. I have tried SPA mode, I have tried Prerendering, I am have reached out to Fuma for help.

Here is a test repo:https://github.com/jkinley/fumatest

So far I can get it to build, but when you click the navigation it breaks.

image

I am very knew to SSR and ServerFunctions. Just trying to find a simple way to deploy my docs without lambdas and servers.

You must be logged in to vote

Replies: 2 comments

Comment options

I have tried this setup and many simliar to this in vite.config.js:

import react from '@vitejs/plugin-react';import { tanstackStart } from '@tanstack/react-start/plugin/vite';import { defineConfig } from 'vite';import tsConfigPaths from 'vite-tsconfig-paths';import tailwindcss from '@tailwindcss/vite';import mdx from 'fumadocs-mdx/vite';export default defineConfig({  server: {    port: 3000  },  plugins: [    mdx(await import('./source.config')),    tailwindcss(),    tsConfigPaths({      projects: ['./tsconfig.json']    }),    tanstackStart({      spa: {        enabled: true,        prerender: {          enabled: true,          crawlLinks: true        }      },      pages: [{ path: '/' }, { path: '/docs' }]    }),    react()  ]});

And when I build and serve on my local, I get this:
image

But when I click on a link:

imageimage
You must be logged in to vote
0 replies
Comment options

if you want full SSG (no SPA mode at all with blank index.html shell page), you can just use static prerendering.

See my comment here for more details:fuma-nama/fumadocs#2442 (reply in thread)

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@jkinley@bcheung

[8]ページ先頭

©2009-2025 Movatter.jp