Server-side rendering of a Svelte app at build-time using a Rollup plugin. Current stable version is 1.0.3, last released in June 2020. The plugin pre-renders a Svelte component with specified props during the Rollup build, outputting static HTML and CSS files. Differentiators: simple Rollup integration, supports custom output file naming, CSS/HTML preprocessing, and selective JS file emission. Ideal for generating static HTML for Svelte apps in a Rollup build pipeline. Note: This project appears to be in maintenance mode with no recent updates.
npm install rollup-plugin-svelte-ssrVerified import paths — ran on the pinned version, not inferred.
Rollup config to SSR a Svelte component into a static HTML file during build.
Place the svelte plugin with generate: 'ssr' before the ssr plugin in the plugins array.
Consider using built-in SvelteKit SSR or other actively maintained solutions.
Use environment variables or build-time configuration to inject dynamic values.
Set skipEmit: true if you only need the HTML output.
Add svelte({ generate: 'ssr' }) to your Rollup config.Use 'import ssr from "rollup-plugin-svelte-ssr"' instead of 'import { ssr } from ...'.Use an older version of Rollup or look for an alternative plugin.