vite · Vite Docs
Server-Side Rendering (SSR) | Vite (main branch)
Explains how to implement server-side rendering with Vite, covering the fundamental concepts, the development server setup, and the build process for SSR-compatible applications.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Server-Side Rendering (SSR) | Vite (main branch)
Explains how to implement server-side rendering with Vite, covering the fundamental concepts, the development server setup, and the build process for SSR-compatible applications.
When To Use
Use when implementing server-side rendering in a Vite project or configuring a development server and build pipeline to support SSR workflows.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/main-vite-server-side-rendering-ssr-branch-workflow-guide.md | A markdown guide explaining server-side rendering concepts, source structure, and dev server setup for Vite. | Questions about a markdown guide explaining server-side rendering concepts, source structure, and dev server setup for Vite. |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-project-structure.text | A text representation of the file structure and directory layout required for a Vite Server-Side Rendering implementation. | Exact payloads, commands, or snippets shown in A text representation of the file structure and directory layout required for a Vite Server-Side Rendering implementa... |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-html-template-struct.text | A text representation of the HTML template structure required for Vite server-side rendering, including the ssr-outlet placeholder. | Exact payloads, commands, or snippets shown in A text representation of the HTML template structure required for Vite server-side rendering, including the ssr-outle... |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-import-meta-env-cond.text | A text snippet demonstrating how to use import.meta.env.SSR to execute conditional logic specifically for the server-side environment. | Exact payloads, commands, or snippets shown in A text snippet demonstrating how to use import.meta.env.SSR to execute conditional logic specifically for the server-... |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-express-middleware-s.text | A Node.js implementation using Express and Vite's middleware mode to set up a custom server-side rendering environment. | Exact payloads, commands, or snippets shown in A Node.js implementation using Express and Vite's middleware mode to set up a custom server-side rendering environment. |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-express-middleware-i.text | An Express middleware implementation demonstrating how to read an index.html template and apply Vite HTML transforms for server-side rendering. | Exact payloads, commands, or snippets shown in An Express middleware implementation demonstrating how to read an index.html template and apply Vite HTML transforms... |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-package-json-scripts.text | The package.json scripts configuration for setting up a Vite server-side rendering development environment. | Exact payloads, commands, or snippets shown in The package.json scripts configuration for setting up a Vite server-side rendering development environment. |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-package-scripts-conf.text | The package.json scripts section defining dev, build:client, and build:server commands for a Vite SSR setup. | Exact payloads, commands, or snippets shown in The package.json scripts section defining dev, build:client, and build:server commands for a Vite SSR setup. |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-build-command-option.text | A diff showing the addition of the --ssrManifest flag to the build:client command in the package.json configuration for SSR. | Exact payloads, commands, or snippets shown in A diff showing the addition of the --ssrManifest flag to the build:client command in the package.json configuration f... |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-vue-server-renderer-.text | A text example demonstrating how to use the vueServerRenderer to render a string and capture module IDs in the context object during Vite SSR. | Exact payloads, commands, or snippets shown in A text example demonstrating how to use the vueServerRenderer to render a string and capture module IDs in the contex... |
examples/main-vite-server-side-rendering-ssr-branch-vite-ssr-plugin-transform.text | A JavaScript function demonstrating how to implement a custom Vite plugin that performs SSR-specific code transformations. | Exact payloads, commands, or snippets shown in A JavaScript function demonstrating how to implement a custom Vite plugin that performs SSR-specific code transformat... |
What This Skill Covers
- Are you an LLM? You can read better optimized documentation at /guide/ssr.md for this page in Markdown format
- Main sections:
Example Projects ,Source Structure ,Conditional Logic ,Setting Up the Dev Server ,Building for Production .
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://main.vite.dev/guide/ssr