Skip to content

Commit 53493d2

Browse files
authored
Merge pull request #493 from aabccd021/patch-1
Add bun support
2 parents f7341bb + 08cade5 commit 53493d2

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)