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: main
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 Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2024 5:39am

@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/",

@sxzz sxzz force-pushed the dev branch 2 times, most recently from 115a451 to 57654f6 Compare July 16, 2024 21:02
@sxzz sxzz deleted the branch egoist:main September 17, 2024 05:23
@sxzz sxzz closed this Sep 17, 2024
@sxzz sxzz reopened this Sep 17, 2024
@sxzz sxzz changed the base branch from dev to main September 17, 2024 05:40
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.

4 participants