From d1e7b2741f84a79c3c9538e17e90f349dcf6e29d Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Sat, 20 Apr 2024 03:06:03 +0900 Subject: [PATCH] revert: perf: use workspace root for fs cache (#15712) This reverts commit 8815763b71788e4787616bccc824468dfd2b45d5. --- 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