We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20df385 commit 2134727Copy full SHA for 2134727
packages/nimiq-vitepress-theme/src/composables/useNimiqConfig.ts
@@ -9,12 +9,12 @@ export interface NimiqVitepressConfig {
9
}
10
11
export function useNimiqConfig(): NimiqVitepressConfig {
12
- // Check if running in browser environment and config is available
13
- if (typeof window !== 'undefined' && typeof __NIMIQ_VITEPRESS_CONFIG__ !== 'undefined') {
+ // Vite's define works in both browser and SSR environments
+ if (typeof __NIMIQ_VITEPRESS_CONFIG__ !== 'undefined') {
14
return __NIMIQ_VITEPRESS_CONFIG__
15
16
17
- // For SSR or when config is not available, return fallback
+ // Fallback only when config is truly not available
18
return {
19
repoURL: undefined,
20
contentPath: '',
0 commit comments