From 77e73590837f710d79d1653e1800eed03b5dbb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sat, 20 Apr 2024 19:06:31 +0900 Subject: [PATCH] revert: perf: use workspace root for fs cache (#15712) (#16476) --- packages/vite/src/node/fsUtils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vite/src/node/fsUtils.ts b/packages/vite/src/node/fsUtils.ts index 9536218c8f8ce4..0377d5824e2aae 100644 --- a/packages/vite/src/node/fsUtils.ts +++ b/packages/vite/src/node/fsUtils.ts @@ -8,7 +8,6 @@ import { safeRealpathSync, tryStatSync, } from './utils' -import { searchForWorkspaceRoot } from './server/searchRoot' export interface FsUtils { existsSync: (path: string) => boolean @@ -131,7 +130,7 @@ function pathUntilPart(root: string, parts: string[], i: number): string { } export function createCachedFsUtils(config: ResolvedConfig): FsUtils { - const root = normalizePath(searchForWorkspaceRoot(config.root)) + const root = config.root // root is resolved and normalized, so it doesn't have a trailing slash const rootDirPath = `${root}/` const rootCache: DirentCache = { type: 'directory' } // dirents will be computed lazily