[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

tree-shake shiki for chakra usage

FoxxMD (Jul 10, 2026, 1:34 PM UTC) 7daa43a8 f8501b2a

+35 -6
+35 -6
src/client/components/shikiAdapter.ts
··· 1 1 import { createShikiAdapter } from "@chakra-ui/react" 2 2 import type { HighlighterGeneric } from "shiki" 3 + import { createHighlighterCore } from 'shiki/core' 4 + import { createOnigurumaEngine } from 'shiki/engine/oniguruma' 5 + //import json from '@shikijs/langs/json'; 6 + // import githubDark from '@shikijs/themes/github-dark'; 7 + // import githubLight from '@shikijs/themes/github-light'; 8 + //import engine from 'shiki/wasm'; 9 + 10 + let highlighterSingleton: HighlighterGeneric<any, any>; 3 11 4 12 export const shikiAdapter = createShikiAdapter<HighlighterGeneric<any, any>>({ 5 - async load() { 6 - const { createHighlighter } = await import("shiki") 7 - return createHighlighter({ 8 - langs: ["json", "plaintext"], 9 - themes: ["github-dark", "github-light"], 10 - }) 13 + load: async () => { 14 + if (highlighterSingleton == undefined) { 15 + highlighterSingleton = await createHighlighterCore({ 16 + themes 17 + : [ 18 + // or a dynamic import if you want to do chunk splitting 19 + import('@shikijs/themes/github-dark'), 20 + import('@shikijs/themes/github-light') 21 + ], 22 + langs 23 + : [ 24 + //json, 25 + // shiki will try to interop the module with the default export 26 + () => import('@shikijs/langs/json'), 27 + ], 28 + // `shiki/wasm` contains the wasm binary inlined as base64 string. 29 + engine: createOnigurumaEngine(import('shiki/wasm')) 30 + }); 31 + } 32 + 33 + return highlighterSingleton; 34 + 35 + // const { createHighlighter } = await import("shiki") 36 + // return createHighlighter({ 37 + // langs: ["json", "plaintext"], 38 + // themes: ["github-dark", "github-light"], 39 + // }) 11 40 }, 12 41 theme: { 13 42 light: "github-light",