File tree 1 file changed +7
-4
lines changed 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -710,16 +710,19 @@ namespace ts {
710
710
else {
711
711
const compilerOptions = extend ( options , defaultInitCompilerOptions ) ;
712
712
const configurations : any = {
713
- compilerOptions : serializeCompilerOptions ( compilerOptions )
713
+ compilerOptions : serializeCompilerOptions ( compilerOptions )
714
714
} ;
715
715
716
716
if ( fileNames && fileNames . length ) {
717
717
// only set the files property if we have at least one file
718
718
configurations . files = fileNames ;
719
719
}
720
- else {
721
- configurations . exclude = [ "node_modules" ] ;
722
- }
720
+ else {
721
+ configurations . exclude = [ "node_modules" ] ;
722
+ if ( compilerOptions . outDir ) {
723
+ configurations . exclude . push ( compilerOptions . outDir ) ;
724
+ }
725
+ }
723
726
724
727
sys . writeFile ( file , JSON . stringify ( configurations , undefined , 4 ) ) ;
725
728
reportDiagnostic ( createCompilerDiagnostic ( Diagnostics . Successfully_created_a_tsconfig_json_file ) , /* compilerHost */ undefined ) ;
You can’t perform that action at this time.
0 commit comments