File tree 1 file changed +3
-4
lines changed
packages/vitest/src/node/workspace
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(
56
56
57
57
projectConfigs . forEach ( ( options , index ) => {
58
58
const parentConfigPath = workspaceConfigPath || vitest . server . config . configFile
59
+ const configDir = parentConfigPath ? dirname ( parentConfigPath ) : vitest . config . root
59
60
// if extends a config file, resolve the file path
60
61
const configFile = typeof options . extends === 'string' && typeof parentConfigPath === 'string'
61
- ? resolve ( parentConfigPath , options . extends )
62
+ ? resolve ( configDir , options . extends )
62
63
: false
63
64
// if extends a root config, use the users root options
64
65
const rootOptions = options . extends === true
65
66
? vitest . _options
66
67
: { }
67
68
// if `root` is configured, resolve it relative to the workespace file or vite root (like other options)
68
69
// 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
72
71
projectPromises . push ( concurrent ( ( ) => initializeProject (
73
72
index ,
74
73
vitest ,
You can’t perform that action at this time.
0 commit comments