feat: restart dev server when tsconfig and tailwind config changes#4947
Conversation
🦋 Changeset detectedLatest commit: f854d55 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
bluwy
left a comment
There was a problem hiding this comment.
The implementation looks great! I have a couple nits around the API name, but I don't have the most context on the history of integrations, so happy to discuss some counterpoints too
|
Yei! @matthewp could you add the |
|
Yep, done! |
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
|
Changes in Using:
Error message: |
|
@mrcaidev that's odd. Make sure you have all your Astro deps up-to-date. Also, you could try renaming your tailwind config to |
All dependencies are up to date. |
|
@mrcaidev Sorry, I can't reproduce the problem. If you can't fix it, open a new issue with a reproduction and mention me, so I get the notification |
Changes
Fixes #4913
Fixes #4914
There are some configuration files that require a full dev server restart to reflect their changes (like
tsconfig.jsonandtailwind.config.js). I've added a method that let integrations add arbitrary files to a watch list:addWatchFile. When a change in a file declared inaddWatchFile, the dev server performs a restart.I've implemented this in the Tailwind integration and hardcoded
tsconfigPathinto the watch list.Testing
N/A
Docs
withastro/docs#1655