Skip to content

Commit a57ca08

Browse files
fix: 修复 node 的 es 版本太高不兼容的构建问题
1 parent 6536757 commit a57ca08

7 files changed

Lines changed: 4 additions & 656 deletions

File tree

build.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,7 @@ const vendorDir = join(outdir, 'vendor', 'audio-capture')
121121
await cp('vendor/audio-capture', vendorDir, { recursive: true })
122122
console.log(`Copied vendor/audio-capture/ → ${vendorDir}/`)
123123

124-
// Step 5: Bundle download-ripgrep script as standalone JS for postinstall
125-
const rgScript = await Bun.build({
126-
entrypoints: ['scripts/download-ripgrep.ts'],
127-
outdir,
128-
target: 'node',
129-
})
130-
if (!rgScript.success) {
131-
console.error('Failed to bundle download-ripgrep script:')
132-
for (const log of rgScript.logs) {
133-
console.error(log)
134-
}
135-
// Non-fatal — postinstall fallback to bun run scripts/download-ripgrep.ts
136-
} else {
137-
console.log(`Bundled download-ripgrep script to ${outdir}/`)
138-
}
139-
140-
// Step 6: Generate cli-bun and cli-node executable entry points
124+
// Step 5: Generate cli-bun and cli-node executable entry points
141125
const cliBun = join(outdir, 'cli-bun.js')
142126
const cliNode = join(outdir, 'cli-node.js')
143127

scripts/download-ripgrep.ts

Lines changed: 0 additions & 335 deletions
This file was deleted.

0 commit comments

Comments
 (0)