Skip to content

Commit fe32926

Browse files
committed
fix: run error
1 parent 5bcb7a7 commit fe32926

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tsup.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { readFileSync, writeFileSync } from 'node:fs';
12
import type { Options } from 'tsup';
23

34
export default [
@@ -7,5 +8,10 @@ export default [
78
clean: true,
89
format: ['cjs'],
910
dts: false,
11+
onSuccess: async () => {
12+
let cli = readFileSync('./bin/cli.cjs', 'utf8');
13+
cli = cli.replace('Context = function(retry) {', 'var Context = function(retry) {')
14+
writeFileSync('./bin/cli.cjs', cli);
15+
}
1016
},
1117
] satisfies Options[];

0 commit comments

Comments
 (0)