From d53dc92fb8c97b2d5d6f86ceb73465ef52495910 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 2 Aug 2021 23:24:10 +0800 Subject: [PATCH] docs: add a note on how to fix WSL2 watch issues (#4478) --- docs/config/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/config/index.md b/docs/config/index.md index 408fa4a0878863..03927c336880e7 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -453,6 +453,8 @@ export default defineConfig(async ({ command, mode }) => { File system watcher options to pass on to [chokidar](https://github.com/paulmillr/chokidar#api). + When running Vite on Windows Subsystem for Linux (WSL) 2, if the project folder resides in a Windows filesystem, you'll need to set this option to `{ usePolling: true }`. This is due to [a WSL2 limitation](https://github.com/microsoft/WSL/issues/4739) with the Windows filesystem. + ### server.middlewareMode - **Type:** `'ssr' | 'html'`