diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index b9f473383487..b7123447c058 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -112,6 +112,9 @@ function makeCypressViteConfig (config: ViteDevServerConfig, vite: Vite): Inline projectRoot, vitePathNodeModules, cypressBinaryRoot, + // Allow in monorepo: https://vitejs.dev/config/server-options.html#server-fs-allow + // Supported from Vite v3 - add null check for v2 users. + vite.searchForWorkspaceRoot?.(process.cwd()), ], }, host: '127.0.0.1',