Serialization
Server function arguments and return values are serialized so they can travel between server and client.
Configuration
Set the mode on solidStart() in vite.config.ts:
import { defineConfig } from "vite";import { solidStart } from "@solidjs/start/config";
export default defineConfig({ plugins: [ solidStart({ serialization: { mode: "json" }, }), ],});Modes
json: deserializes withJSON.parseon the client. It avoidseval, so it fits a strict CSP. This is the default.js: a smaller binary format that needsevalon the client, which a strong CSP blocks.
If your app enforces a Content Security Policy, keep json.