Skip to content

Commit befc7ed

Browse files
committed
docs: fixed docs
1 parent 650e741 commit befc7ed

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/docs/components/content/CodeBlockFile.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ const props = defineProps<{
99
filename?: string
1010
}>()
1111
12-
const modules = import.meta.glob('./*.vue', { as: 'raw' })
12+
// const modules = import.meta.glob('./*.vue', { as: 'raw' })
13+
14+
const modules = {
15+
'./Playground.vue': await import('./Playground.vue?raw'),
16+
}
17+
18+
// console.log('modules → ', modules)
1319
1420
function prepareContent(content: string) {
1521
return `\`\`\`${props.language || ''}${props.filename ? ` [${props.filename}]` : ''}\n${content}\n\`\`\``
@@ -19,7 +25,9 @@ const module = modules[props.path]
1925
if (!module)
2026
console.error('Component Not Found.')
2127
22-
const content = prepareContent(await module() as any)
28+
// const content = prepareContent(await module() as any)
29+
const content = prepareContent(module.default as any)
30+
2331
// console.log(content)
2432
2533
const shiki = await useShiki()

0 commit comments

Comments
 (0)