-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.json
andtailwind.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
tsconfigPath
into the watch list.Testing
N/A
Docs
withastro/docs#1655