Skip to content

Commit

Permalink
revert: perf: use workspace root for fs cache (#15712) (#16476)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Apr 20, 2024
1 parent 6977352 commit 77e7359
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vite/src/node/fsUtils.ts
Expand Up @@ -8,7 +8,6 @@ import {
safeRealpathSync,
tryStatSync,
} from './utils'
import { searchForWorkspaceRoot } from './server/searchRoot'

export interface FsUtils {
existsSync: (path: string) => boolean
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 77e7359

Please sign in to comment.