We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abf7240 commit 205c0cfCopy full SHA for 205c0cf
1 file changed
build.js
@@ -7,6 +7,15 @@ await Bun.build({
7
minify: true,
8
splitting: false,
9
sourcemap: "external",
10
- target: "bun",
+ target: "node", // or 'bun', 'browser'
11
plugins: [dts()],
12
}).catch(console.error);
13
+
14
+// shebang process
15
+async function shebangProcess(filePath, shebang) {
16
+ const originalContent = await Bun.file(filePath).text();
17
+ const contentWithShebang = `${shebang}\n${originalContent}`;
18
+ await Bun.write(filePath, contentWithShebang);
19
+}
20
21
+shebangProcess("./dist/index.js", "#!/usr/bin/env node");
0 commit comments