Skip to content

Commit 96665de

Browse files
committed
update
1 parent 7154518 commit 96665de

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

packages/app/app/components/Commits.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import bash from '@shikijs/langs/bash'
44
import githubDark from '@shikijs/themes/github-dark'
55
import githubLight from '@shikijs/themes/github-light'
66
import { marked } from 'marked'
7-
import { createHighlighterCoreSync } from 'shiki/core'
7+
import { createHighlighterCoreSync, type HighlighterCore } from 'shiki/core'
88
import { createJavaScriptRegexEngine } from 'shiki/engine/javascript'
99
1010
const props = defineProps<{
@@ -51,7 +51,13 @@ const selectedCommit = shallowRef<
5151
const colorMode = useColorMode()
5252
let shiki: HighlighterCore
5353
54-
onBeforeMount(() => {
54+
onBeforeMount(async () => {
55+
if (typeof window === 'undefined') {
56+
const {loadWasm} = await import('shiki')
57+
// @ts-ignore
58+
await loadWasm(import('shiki/onig.wasm'))
59+
}
60+
5561
shiki = createHighlighterCoreSync({
5662
themes: [githubDark, githubLight],
5763
langs: [bash],

packages/app/e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ beforeAll(async () => {
3434
server = await app.listen(3300)
3535

3636
await ezSpawn.async(
37-
'pnpm cross-env TEST=true pnpm --filter=app run build',
37+
'pnpm cross-env TEST=true GH_BASE_URL=http://localhost:3300 pnpm --filter=app run build',
3838
[],
3939
{
4040
stdio: 'inherit',

0 commit comments

Comments
 (0)