web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 108 forks source link

[Feature]: Backend support/docs example #1151

Open zmzlois opened 3 weeks ago

zmzlois commented 3 weeks ago

What problem does this feature solve?

wondering when will we incorporate backend support since it's a static site

I was thinking to build an interactive roadmap so people can add features on the doc site using Redis + Deno or whatever edge function but not sure will the deploy fail if I add "use server" flag

example like https://roadmap.upstash.com/

What does the proposed API look like?

a section on the doc about backend:

  1. using serverless function
  2. "use server" whether it is supported (@chenjiahan said it won't) ? I have see express support on github for rspress, but it's not lived on the docs about how mdx + react component + backend will co-live together

Since Rspress doesn't support backend as discussion with @chenjiahan maybe good to include a doc section "How to use module federation to allow a remote module for backend service"

Maybe I can open a PR on this after I finish our current documentation and experiment with how MF works with Rspress?

chenjiahan commented 3 weeks ago

Yeah, Rspress is not coupled with any backend solutions, so users can pick anything they want. Also Rspress does not support the "use server" flag.

Examples can be added to https://github.com/rspack-contrib/rspack-examples 😄