File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1079,6 +1079,12 @@ namespace ts.server {
1079
1079
project ,
1080
1080
fileName => this . onConfigFileAddedForInferredProject ( fileName ) ) ;
1081
1081
1082
+ if ( root . scriptKind === ScriptKind . JS || root . scriptKind === ScriptKind . JSX ) {
1083
+ const options = project . getCompilerOptions ( ) ;
1084
+ options . maxNodeModuleJsDepth = 2 ;
1085
+ project . setCompilerOptions ( options ) ;
1086
+ }
1087
+
1082
1088
project . updateGraph ( ) ;
1083
1089
1084
1090
if ( ! useExistingProject ) {
Original file line number Diff line number Diff line change @@ -169,13 +169,6 @@ namespace ts.server {
169
169
this . compilerOptions . allowNonTsExtensions = true ;
170
170
}
171
171
172
- if ( this . projectKind === ProjectKind . Inferred ) {
173
- // Add default compiler options for inferred projects here
174
- if ( this . compilerOptions . maxNodeModuleJsDepth === undefined ) {
175
- this . compilerOptions . maxNodeModuleJsDepth = 2 ;
176
- }
177
- }
178
-
179
172
this . setInternalCompilerOptionsForEmittingJsFiles ( ) ;
180
173
181
174
this . lsHost = new LSHost ( this . projectService . host , this , this . projectService . cancellationToken ) ;
You can’t perform that action at this time.
0 commit comments