From 8b11fea91560c5f084c31aa9b19e64832ac6c3b5 Mon Sep 17 00:00:00 2001 From: patak <583075+patak-dev@users.noreply.github.com> Date: Fri, 16 Feb 2024 05:38:18 +0100 Subject: [PATCH] fix: fs cached checks disabled by default for yarn pnp (#15920) --- packages/vite/src/node/fsUtils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/fsUtils.ts b/packages/vite/src/node/fsUtils.ts index 5b4ea371af48ec..ae1892e989677c 100644 --- a/packages/vite/src/node/fsUtils.ts +++ b/packages/vite/src/node/fsUtils.ts @@ -48,10 +48,12 @@ export function getFsUtils(config: ResolvedConfig): FsUtils { if ( config.command !== 'serve' || config.server.fs.cachedChecks === false || - config.server.watch?.ignored + config.server.watch?.ignored || + process.versions.pnp ) { // cached fsUtils is only used in the dev server for now // it is enabled by default only when there aren't custom watcher ignored patterns configured + // and if yarn pnp isn't used fsUtils = commonFsUtils } else if ( !config.resolve.preserveSymlinks &&