egoist / tsup

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

FR: beforeBuild "hook" just like onSucces #1094

Open noudadrichem opened 3 months ago

noudadrichem commented 3 months ago

Is there an in build way to run a function before the build starts just like onSuccess does for after the build?

I'm asking this as it would be very neat to only have tsup as my command and have everything configured in 1 file. Now I need to stitch multiple scripts together.

Doable but though about this while implementing it.

Upvote & Fund

Fund with Polar

coravacav commented 3 months ago

A workaround I've been doing is putting any prebuild script in the tsup.config file. It's guaranteed to run before tsup itself, and solved all the things I need