File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
- import { resolve , dirname } from 'path' ;
1
+ import { resolve , dirname , join } from 'path' ;
2
2
import type * as _ts from 'typescript' ;
3
3
import {
4
4
CreateOptions ,
@@ -167,9 +167,13 @@ export function readConfig(
167
167
168
168
// Read project configuration when available.
169
169
if ( ! skipProject ) {
170
- configFilePath = project
171
- ? resolve ( cwd , project )
172
- : ts . findConfigFile ( projectSearchDir , fileExists ) ;
170
+ if ( project ) {
171
+ const resolved = resolve ( cwd , project ) ;
172
+ const nested = join ( resolved , 'tsconfig.json' ) ;
173
+ configFilePath = fileExists ( nested ) ? nested : resolved ;
174
+ } else {
175
+ configFilePath = ts . findConfigFile ( projectSearchDir , fileExists ) ;
176
+ }
173
177
174
178
if ( configFilePath ) {
175
179
let pathToNextConfigInChain = configFilePath ;
You can’t perform that action at this time.
0 commit comments