How Do I Turn On SSR?

When I started my project, I enabled SSR. I thought that was all I had to do. But in Ryan's "The Shape of Frameworks to Come" stream on YouTube, he edits the vite.config.ts file from:
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({});
To:
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({ start: { ssr: true }});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({ start: { ssr: true }});
Is that all you have to do? Or is there more to it? I don't see this step in the SolidStart docs. I assumed SolidStart controlled SSR. But if there is no information about turning on SSR in the SolidStart docs, then I must be wrong. So, is SSR a Vite thing? A SolidJS thing? Where can I read/learn more about working with and configuring SSR? Thanks, Chris
2 Replies
Brendonovich
Brendonovich12mo ago
Yeah SSR is toggled as part of the vite config, it’s one of a few start-specific vite options: https://start.solidjs.com/api/vite
SolidStart Beta Documentation
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
ChrisThornham
ChrisThornhamOP12mo ago
Thank you! It looks like I need to read up on Vite and how to work with the vite.config file. Much appreciated. Chris
Want results from more Discord servers?
Add your server