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: vite-node watch mode #890

Merged
merged 15 commits into from Mar 16, 2022
Merged

Conversation

poyoho
Copy link
Member

@poyoho poyoho commented Mar 3, 2022

fix: #889

don't close server when watch mode is open.And delete the moduleCache when the module refresh.

@netlify
Copy link

netlify bot commented Mar 3, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: 686093a

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/62326c639f698e0009e0b32d

😎 Browse the preview: https://deploy-preview-890--vitest-dev.netlify.app

@poyoho poyoho changed the title feat: watch feat: vite-node watch mode Mar 3, 2022
@poyoho poyoho marked this pull request as draft March 3, 2022 11:33
@poyoho poyoho marked this pull request as ready for review March 3, 2022 14:51
@lucas-jones
Copy link

When will this be release? Is there a way for me to use it now?

Eager to try this out!

packages/vite-node/src/cli.ts Outdated Show resolved Hide resolved
@poyoho
Copy link
Member Author

poyoho commented Mar 5, 2022

When will this be release? Is there a way for me to use it now?

Eager to try this out!

I think I need to improve the update process

@poyoho poyoho marked this pull request as draft March 5, 2022 15:38
@poyoho poyoho marked this pull request as ready for review March 7, 2022 13:39
console.log(dim(`[update] ${path}`))
// because module don't had `import.meta.hot.accept`
// only can refresh all module
runner.moduleCache.clear()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at least we should keep the cache of node_modules.

@poyoho
Copy link
Member Author

poyoho commented Mar 7, 2022

@antfu Should we add unit tests in the test directory for vite-node?

@antfu antfu added this to the Next milestone Mar 11, 2022
@antfu antfu merged commit 1722f98 into vitest-dev:main Mar 16, 2022
@poyoho poyoho deleted the feat/vite-node-watch branch March 20, 2022 11:49
@antfu antfu removed this from the Next milestone May 3, 2022
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.

Watcher option not working in vite-node
3 participants