0.0.0 • Published 10 months ago
@lhechenberger/tsup-dev v0.0.0
@lhechenberger/tsup-dev
tsup --watch, but uses your tsup.config to determine which files to watch
This package is meant to improve the development experience of running tsup in watch mode:
Unlike running tsup --watch, running tsup-dev will not ignore the watch property inside *tsup.
Usage
Installation
As always, install the package using your favorite package manager, e.g. with pnpm:
pnpm add --save-dev @lhechenberger/tsup-devYou should install it in all your monorepo's packages that use tsup
Adjust your tsup.config.ts
Use defineConfig from this package instead of tsup.
// tsup.config.ts
import { defineConfig } from '@lhechenberger/tsup-dev';
export default defineConfig({
// Your tsup options, see https://tsup.egoist.dev
});Adjust your dev script
Inside your package's package.json file, adjust your dev (or whatever name you prefer) script:
{
"name": "my-package",
"scripts": {
"build": "tsup",
- "dev": "tsup --watch",
+ "dev": "tsup-dev",
...
}
}0.0.0
10 months ago