Static site generation creates web pages ahead of request time as prebuilt files. It is one rendering strategy alongside client-side rendering and server-side rendering. section 5.1
Posts page
An SSG example awaits fetchPosts() and passes the results to a Posts component. section 5.1
Table 5.2 Vite vs. mega-frameworks comparison
|
Aspect
|
Vite
|
Mega-Frameworks: Next.js, React Router (Remix), Astro
|
|
Purpose
|
Fast dev server + build tool
|
Full-stack web apps with routing + SSR
|
|
Routing
|
Manual (via React Router)
|
Builtin, file-based
|
|
Rendering
|
CSR is default; SSR, SSG, and hybrid need extra setup
|
CSR, SSR, SSG, and hybrid
|
|
Performance
|
Very fast (esbuild-powered)
|
Optimized for speed + scalability
|
|
Data fetching
|
Custom
|
Builtin (e.g.,
getServerSideProps)
|
|
API support
|
None
|
Builtin API routes
|
|
Use Case
|
Small to medium apps
|
Production-grade, scalable apps
|
Compare how Vite and mega-frameworks support static site generation alongside other rendering strategies. section 5.1




