We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ae47b5 commit 69f1adfCopy full SHA for 69f1adf
server/src/parser.ts
@@ -1,6 +1,15 @@
1
import * as Parser from 'web-tree-sitter'
2
3
+const _global: any = global
4
+
5
export async function initializeParser(): Promise<Parser> {
6
+ if (_global.fetch) {
7
+ // NOTE: temporary workaround for emscripten node 18 support.
8
+ // emscripten is used for compiling tree-sitter to wasm.
9
+ // https://github.com/emscripten-core/emscripten/issues/16915
10
+ delete _global.fetch
11
+ }
12
13
await Parser.init()
14
const parser = new Parser()
15
0 commit comments