feat: more advanced prop serializer for islands (#1224)

This commit adds support for an advanced (de)serializer that is used
for page state (island props and plugin state). This new serializer
supports maintaining references (thus supporting circular objects,
and multi-referenced objects).

This is a pre-requisite for allowing to pass signals, JSX, Uint8Arrays,
Date, and many other "advanced" values.
This commit is contained in:
Luca Casonato
2023-05-31 10:12:07 +02:00
committed by GitHub
parent 060e2bb50d
commit a6852fa58f
16 changed files with 335 additions and 77 deletions
+1 -3
View File
@@ -483,9 +483,7 @@ export class ServerContext {
status: number,
) => {
const imports: string[] = [];
if (this.#dev) {
imports.push(REFRESH_JS_URL);
}
if (this.#dev) imports.push(REFRESH_JS_URL);
return (
req: Request,
params: Record<string, string>,