From b1d8ad5ccd4c381ee8368deceb382a06f2d67de2 Mon Sep 17 00:00:00 2001 From: patak Date: Thu, 15 Feb 2024 15:02:46 +0100 Subject: [PATCH] fix: fs cached checks disabled by default for yarn pnp --- 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 &&