-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Hot Module Reload not working Windows Docker + wsl #1153
Comments
You can resolve this by add export default {
chokidarWatchOptions: {
usePolling: true
}
} |
Passing options to chokidar this way is not yet possible in 1.0.0-rc.13 and 2.0.0.-alpha.2 breaks (it's alpha so understandable). Can we expect this behavior to be implemented in 1.x.x? |
Passing // https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
watch: {
usePolling: true
}
}
}) I found this out by exploring the latest Vite server config docs. This workaround is required simply because of the way WSL currently works with the Windows filesystem. If you move your files into the Linux filesystem, you won't have this problem and possibly save yourself from a couple others--but that isn't my favorite way of doing things. 😄 |
Describe the bug
I use windows docker(19.03.13) + wsl 2 (Ubuntu 20.04).
On windows, changes to files are not captured and hmr does not work.
the solution is to add a configuration to the chokidar
usePolling: true
vite/src/node/server/index.ts
Line 66 in 6ea0e85
would it be possible to add an option to the command?
vite --use-polling
System Info
vite
version: 1.0.0-rc.13vue
version fromyarn.lock
@vue/compiler-sfc
version 3.0.2The text was updated successfully, but these errors were encountered: