Release Notes
Minor Changes
4c803e5: Add
serialization.pluginsto configure custom Seroval plugins for server functions.Values Seroval has no built-in support for (Mongo's
ObjectId, Prisma'sDecimal,Temporal, and other custom classes) previously threw when returned from or passed to a server function. Point the new option at a module whose default export is an array of plugins:// vite.config.ts solidStart({ serialization: { plugins: "src/seroval-plugins.ts", }, });// src/seroval-plugins.ts import { createPlugin } from "@solidjs/start/serialization";The module is bundled into both the client and the server so both ends of a server function agree on the format, so it must not import server-only code. SolidStart's built-in plugins keep precedence. Only server-function and action payloads are affected; the SSR hydration payload is serialized by
solid-js/web.Also adds a
@solidjs/start/serializationentrypoint re-exporting Seroval'screatePlugin,OpaqueReference, and plugin types, so plugin authors stay on the same Seroval version SolidStart serializes with.
Patch Changes
e117d91: Route module ids now end in the source extension, so ecosystem plugins apply inside
src/routes.Route files are imported through an id carrying the picked exports in the query (
routes/api.ts?pick=GET), which left the id ending in the export name. Plugins whose filter is anchored on the file extension (/\.[cm]?[jt]sx?$/, the default forunplugin-auto-import,unplugin-macrosand others) silently skipped every route file. The id now ends with alang.<ext>marker, the same convention Vue SFCs use for?vue&type=script&lang.ts. Chunk filenames are unchanged.d8f1ea8: Apply the configured
nonceto the two script tags that were still missing it, so a strictscript-srcCSP no longer needsunsafe-inline:- The client-side redirect that streaming mode emits after the shell has already flushed (
<script>window.location=...</script>) now carries the nonce. - The SPA entry script tag now carries the nonce, matching the SSR entry script.
- The client-side redirect that streaming mode emits after the shell has already flushed (
27fca88: Fix actions returning
json()orreload()leaving no-JS form submissions stranded on the/_serverendpoint. These responses carry a value rather than a destination, so the redirect issued for progressive-enhancement submissions had noLocationheader. It now falls back to the submitting page, and the response value is unwrapped into the flash cookie souseSubmission().resultmatches the JS path.75debc3: Scope the built-in
~alias to the app package, so files in other workspace packages can map~to their own root through an importer-aware plugin such asvite-tsconfig-paths. In stylesheets and asset URLs (CSS@import,url(),new URL(..., import.meta.url))~still always means the app root, since Vite resolves those without running plugins.