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 49ff53c commit 134233fCopy full SHA for 134233f
cli/src/templates/index.js
@@ -1,6 +1,10 @@
1
const root = require("path").join(__dirname, "..", "..");
2
3
-module.exports = require("node-gyp-build")(root);
+module.exports =
4
+ typeof process.versions.bun === "string"
5
+ // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time
6
+ ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-typescript.node`)
7
+ : require("node-gyp-build")(root);
8
9
try {
10
module.exports.nodeTypeInfo = require("../../src/node-types.json");
0 commit comments