Skip to content

Commit

Permalink
fix(highlight): remove @nuxt/kit from runtime bundle (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jul 11, 2022
1 parent d41205a commit 772f48f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/server/api/highlight.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 772f48f

Please sign in to comment.