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