From e276c70b295fc182e1b6b497f91f3a7dc2d73dcb Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 19:01:27 +0000 Subject: [PATCH 1/2] chore: frontends changeset is a patch while in pre-release Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0117BoWNQHxQ9311k7tQMEKs --- .changeset/frontends-option.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/frontends-option.md b/.changeset/frontends-option.md index 9e02462..e32ea47 100644 --- a/.changeset/frontends-option.md +++ b/.changeset/frontends-option.md @@ -1,5 +1,5 @@ --- -'@solidjs/vite-plugin': minor +'@solidjs/vite-plugin': patch --- Add a `frontends` option: other languages that lower to Solid can claim a file extension and compile its modules themselves (`frontends: { ".x": x() }`). A front end's `compile(source, { id, moduleId, ssr, root, solid, addWatchFile })` returns `{ code, map, css }`, given the compiler options this plugin would use for a JSX module in that environment; the result then takes the lowered `.tsrx` route (lazy and refresh passes, server functions keyed by the module's real path, `css` as a CSS module, dep scanning). Server functions in a front end's modules need `@solidjs/compiler` with secondary passes that accept any extension. `.rx` (ReactiveScript) is built in: with `@reactivescript/compiler` installed in the project, `.rx` modules compile with no option. From 73f67e3f04170160ecbeaaa9d6dde981c8ecd2f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 19:22:56 +0000 Subject: [PATCH 2/2] docs: custom serialization through configure and clientSetup Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0117BoWNQHxQ9311k7tQMEKs --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index aa9507c..6174d3d 100644 --- a/README.md +++ b/README.md @@ -949,6 +949,30 @@ configureServerFunctionsServer({ Set `csrf: false` only when another trusted layer protects the endpoint. +Custom serialization (extra seroval plugins for class instances such as a +`Money` or an `ObjectId`) is configured the same way, once per side. Set the +server codec in the `configure` module and the client codec in +[`start.clientSetup`](#optionsstart), both from one shared options module: + +```ts +// src/serialization.ts +import type { JSONCodecOptions } from '@solidjs/web/serialization'; +export default { plugins: [MoneyPlugin] } satisfies JSONCodecOptions; + +// src/server-config.ts (serverFunctions.configure) +import { configureServerFunctionsServer } from '@solidjs/web/server-functions/server'; +import codec from './serialization'; +configureServerFunctionsServer({ codec }); + +// src/client-setup.ts (start.clientSetup) +import { configureServerFunctionsClient } from '@solidjs/web/server-functions/client'; +import codec from './serialization'; +configureServerFunctionsClient({ codec }); +``` + +Both sides must use the same plugins. This covers server-function arguments +and results; the SSR hydration payload takes its own `plugins` option. + Meta-frameworks that need to control plugin ordering and dispatch requests through their own server should use the standalone `serverFunctions()` export instead, which never installs the dev middleware. See