Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tsup.confg.* file support in watch mode #712

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

lvqq
Copy link

@lvqq lvqq commented Sep 11, 2022

Since watch mode doesn't watch the tsup.config.* file, so every time I change the config I need to kill the watch process and restart.

@vercel
Copy link

vercel bot commented Sep 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
tsup ✅ Ready (Inspect) Visit Preview Nov 21, 2022 at 5:31AM (UTC)

@egoist
Copy link
Owner

egoist commented Oct 6, 2022

The config is only loaded once before build: https://github.com/lvqq/tsup/blob/25d15657aceacce2c8bf5458f1048cbce5d8c8ea/src/index.ts#L127

In order to support this we need to re-load the config file when it's changed, and recreate the watcher since the watch config may be changed too

@lvqq
Copy link
Author

lvqq commented Oct 7, 2022

Thanks!I will take a look later

@williamli
Copy link

found a way around this by using npm package watch till tsup support reloading natively.

"dev": "watch 'tsup --watch' src/",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants