Standalone build of shiki fully compatible with all ESM environments.
Install:
# npm
npm i shiki-es
# yarn
yarn add shiki-es
import { getHighlighter } from 'shiki-es'
const highlighter = await getHighlighter({ theme: 'nord' })
console.log(highlighter.codeToHtml(`console.log('shiki');`, { lang: 'js' }))
MIT