Skip to content

Commit

Permalink
fix: add eco stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 16, 2024
1 parent 3bcb330 commit ca46452
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/vike-react/src/renderer/onRenderHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import React from 'react'
import type { OnRenderHtmlAsync } from 'vike/types'

checkVikeVersion()
addEcosystemStamp()

const onRenderHtml: OnRenderHtmlAsync = async (pageContext): ReturnType<OnRenderHtmlAsync> => {
const title = getHeadSetting('title', pageContext)
Expand Down Expand Up @@ -66,3 +67,10 @@ function checkVikeVersion() {
}
throw new Error('Update Vike to 0.4.147 or above')
}

// Used by:
// - react-streaming (to improve error messages)
function addEcosystemStamp() {
const g = globalThis as Record<string, unknown>
g._isVikeReactApp = true
}

0 comments on commit ca46452

Please sign in to comment.