Open
Description
The readme file shows an approach with web platform support :
import { createHighlighterCore } from '@shikijs/core'
import { createOnigurumaEngine } from '@shikijs/engine-oniguruma'
import { createNativeEngine, isNativeEngineAvailable } from 'react-native-shiki-engine'
function createAdaptiveEngine() {
// Use native engine for native platforms
if (isNativeEngineAvailable()) {
return createNativeEngine()
}
// Fallback to Shiki's WASM engine for web platforms
return createOnigurumaEngine(import('shiki/wasm'))
}
const highlighter = createHighlighterCore({
themes: ['nord'],
langs: ['javascript'],
engine: createAdaptiveEngine(),
})
can you provide an example expo project to show how to use it in real world project ?
Metadata
Metadata
Assignees
Labels
No labels