Skip to content

Commit 7628119

Browse files
committed
docs: preload shiki languages used in twoslash hovers
1 parent d1059f2 commit 7628119

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/docs/.vitepress/config/shared.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ export const sharedConfig = defineConfig({
101101
light: 'github-light',
102102
},
103103

104+
// twoslash renders the code fences found in JSDoc comments synchronously,
105+
// so their languages can't be lazy loaded and must be preloaded here
106+
languages: ['vue', 'ts', 'js'],
107+
104108
attrs: {
105109
leftDelimiter: '%{',
106110
rightDelimiter: '}%',

0 commit comments

Comments
 (0)