diff --git a/src/utils/shiki.ts b/src/utils/shiki.ts index fa8bb48a52..1840219171 100644 --- a/src/utils/shiki.ts +++ b/src/utils/shiki.ts @@ -1,12 +1,19 @@ -import { getHighlighter, type Highlighter } from "shikiji"; +import type { Highlighter } from "shikiji"; +import { getHighlighterCore } from "shikiji/core"; + +import minLight from "shikiji/themes/min-light.mjs"; +import nord from "shikiji/themes/nord.mjs"; +import getWasm from "shikiji/wasm"; let shiki: Highlighter | null = null; export async function getShikiSingleton() { if (!shiki) { - shiki = await getHighlighter({ - themes: ["nord", "min-light"], - langs: ["ansi"], + shiki = await getHighlighterCore({ + themes: [nord, minLight], + langs: [], + + loadWasm: getWasm, }); } return shiki;