Skip to content

Commit 68f13fa

Browse files
committed
chore: build errors
1 parent 19f054e commit 68f13fa

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

client/composables/shiki.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { MaybeRef } from '@vueuse/core'
21
import type { HighlighterCore } from 'shiki'
2+
import type { Ref } from 'vue'
33
import { createHighlighterCore } from 'shiki/core'
44
import { createJavaScriptRegexEngine } from 'shiki/engine/javascript'
55
import { computed, ref, toValue } from 'vue'
@@ -76,7 +76,7 @@ export async function loadShiki() {
7676
return shiki.value
7777
}
7878

79-
export function renderCodeHighlight(code: MaybeRef<string>, lang: 'json' | 'html' | 'bash' | 'robots-txt') {
79+
export function renderCodeHighlight(code: string | Ref<string>, lang: 'json' | 'html' | 'bash' | 'robots-txt') {
8080
return computed(() => {
8181
const colorMode = devtools.value?.colorMode || 'light'
8282
return shiki.value!.codeToHtml(toValue(code), {

src/devtools.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ export function setupDevToolsUI(options: ModuleOptions, resolve: Resolver['resol
2424
// In local development, start a separate Nuxt Server and proxy to serve the client
2525
else {
2626
nuxt.hook('vite:extendConfig', (config) => {
27-
config.server = config.server || {}
28-
config.server.proxy = config.server.proxy || {}
27+
// @ts-expect-error - config.server may be readonly but we need to set it
28+
config.server ??= {}
29+
config.server.proxy ??= {}
2930
config.server.proxy[DEVTOOLS_UI_ROUTE] = {
3031
target: `http://localhost:${DEVTOOLS_UI_LOCAL_PORT}${DEVTOOLS_UI_ROUTE}`,
3132
changeOrigin: true,

0 commit comments

Comments
 (0)