fix: bun compile fix

This commit is contained in:
Nikhil Sonti
2026-02-23 17:26:51 -08:00
parent 796112c3d6
commit 8c9c5d0d9a

View File

@@ -25,7 +25,7 @@
*/
import { spawn } from 'node:child_process'
import { mkdirSync, readFileSync, rmSync } from 'node:fs'
import { mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
import { join, resolve } from 'node:path'
import { parse } from 'dotenv'
@@ -298,6 +298,9 @@ async function build(config: BuildConfig): Promise<void> {
mkdirSync('dist/server', { recursive: true })
// Bun compiled binaries require a package.json next to the executable
writeFileSync('dist/server/package.json', JSON.stringify({ type: 'module' }))
if (shouldUploadSourceMaps) {
log.step('Building source maps...')
await buildSourceMaps(buildEnv)