File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/vitest/src/node/workspace Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -56,19 +56,18 @@ export async function resolveWorkspace(
5656
5757 projectConfigs . forEach ( ( options , index ) => {
5858 const parentConfigPath = workspaceConfigPath || vitest . server . config . configFile
59+ const configDir = parentConfigPath ? dirname ( parentConfigPath ) : vitest . config . root
5960 // if extends a config file, resolve the file path
6061 const configFile = typeof options . extends === 'string' && typeof parentConfigPath === 'string'
61- ? resolve ( parentConfigPath , options . extends )
62+ ? resolve ( configDir , options . extends )
6263 : false
6364 // if extends a root config, use the users root options
6465 const rootOptions = options . extends === true
6566 ? vitest . _options
6667 : { }
6768 // if `root` is configured, resolve it relative to the workespace file or vite root (like other options)
6869 // if `root` is not specified, inline configs use the same root as the root project
69- const root = options . root
70- ? resolve ( workspaceConfigPath || vitest . config . root )
71- : vitest . config . root
70+ const root = options . root ? resolve ( configDir ) : vitest . config . root
7271 projectPromises . push ( concurrent ( ( ) => initializeProject (
7372 index ,
7473 vitest ,
You can’t perform that action at this time.
0 commit comments