File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/docs/components/content Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff 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
1420function prepareContent(content : string ) {
1521 return ` \`\`\` ${props .language || ' ' }${props .filename ? ` [${props .filename }] ` : ' ' }\n ${content }\n\`\`\` `
@@ -19,7 +25,9 @@ const module = modules[props.path]
1925if (! 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
2533const shiki = await useShiki ()
You can’t perform that action at this time.
0 commit comments