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

fix(vite): disable server.watch for child compiler during build #8320

Merged

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Dec 17, 2023

Closes: #8313

Vite introduced server.watch: null in vitejs/vite#14208. Initial use case was for Vitest, but reading the thread there, it looks like Astro also had such use case.
I think disabling server.watch during dev might be also fine since currently child compiler doesn't make use of Vite's caching/invalidation so watcher might not be necessary as well. But for now, disabling for build seems obvious, so I only did that here.

testing

I cannot think of a way to verify the change exactly... Maybe better to ask the issue author to verify this by patching it locally.

Copy link

changeset-bot bot commented Dec 17, 2023

⚠️ No Changeset found

Latest commit: 3687e94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@hi-ogawa hi-ogawa marked this pull request as ready for review December 17, 2023 23:54
Copy link
Member

@markdalgleish markdalgleish left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This makes sense to me.

@markdalgleish markdalgleish merged commit 1e7b07b into remix-run:dev Dec 21, 2023
9 checks passed
@hi-ogawa hi-ogawa deleted the fix-vite-no-watch-build-viteChildCompiler branch December 21, 2023 06:08
Copy link
Contributor

🤖 Hello there,

We just published version 2.4.1-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 2.4.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants