egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.48k stars 209 forks source link

onSuccess behavior on windows run before tsup finish bundling #1061

Open axmad386 opened 6 months ago

axmad386 commented 6 months ago

I don't know how describe my problem correctly. When I use tsup in watch mode, then use onSuccess to trigger something, it's works on linux but on windows the behavior is strange. This is the script I run

tsup --watch --onSuccess 'node dist/main.js'

On linux, the behaviour is correct, but on windows, node dist/main.js run before tsup finishing bundling so it will throw error that dist/main.js doesn't exist. Did I miss something?

Upvote & Fund

Fund with Polar