diff --git a/packages/vike-react/renderer/+config.ts b/packages/vike-react/renderer/+config.ts index e3a41050..6e434f0c 100644 --- a/packages/vike-react/renderer/+config.ts +++ b/packages/vike-react/renderer/+config.ts @@ -28,6 +28,11 @@ export default { // https://vike.dev/onRenderClient onRenderClient: 'import:vike-react/renderer/onRenderClient:onRenderClient', + passToClient: [ + // https://github.com/vikejs/vike-react/issues/25 + process.env.NODE_ENV === 'production' && '$$typeof' + ].filter(isNotFalse), + // https://vike.dev/clientRouting clientRouting: true, hydrationCanBeAborted: true, @@ -112,3 +117,7 @@ declare global { } } } + +function isNotFalse(val: T | false): val is T { + return val !== false +}