From dca7b9c1adc4d5cee997157b754211e94c89928f Mon Sep 17 00:00:00 2001 From: Romuald Brillout Date: Thu, 8 Aug 2024 11:42:26 +0200 Subject: [PATCH] fix: don't unnecessarily pass useConfig() values to client-side --- vike-solid/renderer/onRenderHtml.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vike-solid/renderer/onRenderHtml.tsx b/vike-solid/renderer/onRenderHtml.tsx index 4bcf0f2..ea6942a 100644 --- a/vike-solid/renderer/onRenderHtml.tsx +++ b/vike-solid/renderer/onRenderHtml.tsx @@ -81,6 +81,9 @@ function getHeadHtml(pageContext: PageContextServer & PageContextInternal) { .join("\n"), ); + // Not needed on the client-side, thus we remove it to save KBs sent to the client + delete pageContext._configFromHook + const headHtml = escapeInject` ${titleTags} ${viewportTag}