diff --git a/package.json b/package.json index 6b63ddb71..2ffd683ea 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ }, "dependencies": { "@nuxt/kit": "^3.0.0-rc.4", + "consola": "^2.15.3", "csvtojson": "^2.0.10", "defu": "^6.0.0", "destr": "^1.1.1", diff --git a/src/runtime/server/api/highlight.ts b/src/runtime/server/api/highlight.ts index 4d840804c..30f8543c7 100644 --- a/src/runtime/server/api/highlight.ts +++ b/src/runtime/server/api/highlight.ts @@ -1,12 +1,12 @@ import { createError, defineLazyEventHandler, useBody } from 'h3' import { getHighlighter, BUNDLED_LANGUAGES, BUNDLED_THEMES, Lang, Theme } from 'shiki-es' -import { useLogger } from '@nuxt/kit' +import consola from 'consola' import { HighlightParams, HighlightThemedToken } from '../../types' import mdcTMLanguage from '../../assets/mdc.tmLanguage.json' import { useRuntimeConfig } from '#imports' // Re-create logger locally as utils cannot be imported from here -export const logger = useLogger('@nuxt/content') +export const logger = consola.withScope('@nuxt/content') /** * Resolve Shiki compatible lang from string.