release: WRNexusJS 0.7.0
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { serializeForHtml } from "@wrnexus/security";
|
||||
import { createRequestStoreContainer } from "@wrnexus/store/server";
|
||||
import type { StoreContainer } from "@wrnexus/store";
|
||||
|
||||
@@ -19,6 +20,6 @@ export async function disposeRequestStores(request: object): Promise<void> {
|
||||
}
|
||||
|
||||
export function renderStoreHydration(container: StoreContainer, nonce?: string): string {
|
||||
const json = JSON.stringify(container.serialize()).replace(/</g, "\\u003c");
|
||||
const json = serializeForHtml(container.serialize());
|
||||
return `<script type="application/json" data-wrnexus-store-hydration${nonce ? ` nonce="${nonce}"` : ""}>${json}</script>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user