Skip to content

Commit

Permalink
minor: improve eco stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 16, 2024
1 parent eeeac01 commit c6fda92
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions vike/node/runtime/index-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ export { injectAssets__public as _injectAssets } from './html/injectAssets/injec
// TODO/v1-release: remove
export { createPageRenderer } from '../createPageRenderer.js'

// Help Telefunc detect the user's stack
globalThis._isVitePluginSsr = true
globalThis._isVike = true
declare global {
var _isVitePluginSsr: true
var _isVike: true
}
addEcosystemStamp()

import './page-files/setup.js'

// Used by:
// - Telefunc (to detect the user's stack)
function addEcosystemStamp() {
const g = globalThis as Record<string, unknown>
g._isVikeApp = true
// We keep the old stamp for older Telefunc versions
g._isVitePluginSsr = true
}

0 comments on commit c6fda92

Please sign in to comment.