Files
dex/docs/lib/source.ts
T
zeekay eb900c603c feat(docs): use flat imports from @hanzo/ui
Simplify imports: import { DocsLayout, RootProvider } from '@hanzo/ui'
instead of @hanzo/ui/docs/layouts/docs subpaths
2025-12-17 14:52:09 -08:00

19 lines
435 B
TypeScript

import { docs } from "@/.source"
import { loader } from "@hanzo/ui"
// Create a single source instance that is reused
// This prevents circular references and stack overflow issues
let _source: ReturnType<typeof loader> | null = null
export function getSource() {
if (!_source) {
_source = loader({
baseUrl: "/docs",
source: docs.toFumadocsSource(),
})
}
return _source
}
export const source = getSource()