Skip to content

Commit 77e7359

Browse files
authored
revert: perf: use workspace root for fs cache (#15712) (#16476)
1 parent 6977352 commit 77e7359

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/vite/src/node/fsUtils.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
safeRealpathSync,
99
tryStatSync,
1010
} from './utils'
11-
import { searchForWorkspaceRoot } from './server/searchRoot'
1211

1312
export interface FsUtils {
1413
existsSync: (path: string) => boolean
@@ -131,7 +130,7 @@ function pathUntilPart(root: string, parts: string[], i: number): string {
131130
}
132131

133132
export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
134-
const root = normalizePath(searchForWorkspaceRoot(config.root))
133+
const root = config.root // root is resolved and normalized, so it doesn't have a trailing slash
135134
const rootDirPath = `${root}/`
136135
const rootCache: DirentCache = { type: 'directory' } // dirents will be computed lazily
137136

0 commit comments

Comments
 (0)