0.1.0 • Published 10 months ago
@lhechenberger/tsup-watch-monorepo v0.1.0
@lhechenberger/tsup-watch-monorepo
Watch your workspace dependencies and rebuild them with tsup
- It automatically watches workspace dependencies in a monorepo to trigger a rebuild so all your output files are always up-to-date
Usage
Installation
As always, install the package using your favorite package manager, e.g. with pnpm:
pnpm add --save-dev @lhechenberger/tsup-watch-monorepoYou should install it in all your monorepo's packages that use tsup
Adjust your tsup.config.ts
Use getFilesToWatch to find files to watch.
// tsup.config.ts
import { defineConfig } from '@lhechenberger/tsup-dev'; // Works with tsup as well
import { getFilesToWatch } from '@lhechenberger/tsup-watch-monorepo';
export default defineConfig({
// Your tsup options, see https://tsup.egoist.dev
watch: await getFilesToWatch(),
});