You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We wanted Vite to be able to cancel a build. We came up with a workaround for being able to do it that I'm sharing here, but we felt it was a bit too hacky to merge it at the moment and are going to hold off until the functionality is hopefully supported here
The text was updated successfully, but these errors were encountered:
Hmm, this could get complicated with incremental builds. I'll have to think about the right API for this so heads up that this might not be added super quickly. Thanks for the report.
The new context object makes this straightforward, so I'm going to add this API there. The context object is primarily meant for incremental builds but you can use it even if you are only building once. That might look like this:
letctx=esbuild.context({// ...})try{setTimeout(()=>ctx.cancel(),500)returnawaitctx.rebuild()}finally{// Remember to dispose of the context when you're doneawaitctx.dispose()}
We wanted Vite to be able to cancel a build. We came up with a workaround for being able to do it that I'm sharing here, but we felt it was a bit too hacky to merge it at the moment and are going to hold off until the functionality is hopefully supported here
The text was updated successfully, but these errors were encountered: