feat(node): support single-file executables via bun build --compile
This commit is contained in:
parent
49ff53cc83
commit
134233f33a
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
const root = require("path").join(__dirname, "..", "..");
|
||||
|
||||
module.exports = require("node-gyp-build")(root);
|
||||
module.exports =
|
||||
typeof process.versions.bun === "string"
|
||||
// Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time
|
||||
? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-typescript.node`)
|
||||
: require("node-gyp-build")(root);
|
||||
|
||||
try {
|
||||
module.exports.nodeTypeInfo = require("../../src/node-types.json");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue