--watch mode leaving without watching
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Putting ```"watch": "tsup --watch"```, in my package.json scripts and running it only does the build and leave right after insead of watching for changes.
Tsup output shows "CLI Running in watch mode".
tsup.config.ts:
```typescript
import { defineConfig } from 'tsup';
import { EXECUTABLE_NAME } from './src/consts';
export default defineConfig({
entry: {
[EXECUTABLE_NAME]: 'src/index.ts',
},
target: 'node22',
format: 'cjs',
outDir: '.',
treeshake: true,
// minify: true,
});
```
Contributor guide
Research direction
Reproduce the issue using the package.json watch script and the supplied tsup.config.ts, then observe why the process exits after the initial build despite reporting watch mode. Verify the behavior by changing src/index.ts while the command runs. Done means the command stays active and rebuilds when source files change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100