-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix(hmr): package.json
change should trigger server restart
#15519
fix(hmr): package.json
change should trigger server restart
#15519
Conversation
Run & review this pull request in StackBlitz Codeflow. |
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.
Sounds like a good addition to me. I know Astro does this manually today too.
We are starting merging PRs towards Vite 5.1, I think we can move forward with this one so it is included in the first beta. |
One detail we should review though is that when a new dependency is installed, the package json will change, triggering an unneeded reload (as it isn't used yet). Then the user will add the import and another reload will be triggered. I still think that it is better to have the reload, and we can later check if we could avoid some reloads if possible (if this becomes a drag in DX) |
@patak-dev Yes, you are right. I created a new pr #15543 based on your suggestion and will only compare the changes in the type field to determine whether a restart is needed. |
…)" This reverts commit 260ebbf.
Description
When vite starts the project, the following prompt will appear. After I change the
type
field value tomodule
according to the prompts, I hope the server can restart.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).