chore: switch to shiki-es
This commit is contained in:
parent
db5a022f3b
commit
04431c7319
4 changed files with 13 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
import type { Highlighter, Lang } from 'shiki'
|
||||
import type { Highlighter, Lang } from 'shiki-es'
|
||||
|
||||
export const shiki = ref<Highlighter>()
|
||||
|
||||
|
@ -7,7 +7,7 @@ let shikiImport: Promise<void> | undefined
|
|||
|
||||
export function highlightCode(code: string, lang: Lang) {
|
||||
if (!shikiImport) {
|
||||
shikiImport = import('shiki')
|
||||
shikiImport = import('shiki-es')
|
||||
.then(async (r) => {
|
||||
r.setCDN('/shiki/')
|
||||
shiki.value = await r.getHighlighter({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue