Skip to content

Commit 08cade5

Browse files
authored
Add bun support
1 parent f7341bb commit 08cade5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/shiki/src/loader.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ export const isNode =
1313
typeof process !== 'undefined' &&
1414
typeof process.release !== 'undefined' &&
1515
process.release.name === 'node'
16-
export const isBrowser = isWebWorker || !isNode
16+
export const isBun =
17+
'process' in globalThis &&
18+
typeof process !== 'undefined' &&
19+
typeof process.release !== 'undefined' &&
20+
process.release.name === 'bun'
21+
export const isBrowser = isWebWorker || (!isNode && !isBun)
1722

1823
// to be replaced by rollup
1924
let CDN_ROOT = '__CDN_ROOT__'

0 commit comments

Comments
 (0)