egoist / egoist/tsup

--watch mode leaving without watching

Open
#1,373 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.