Skip to content

Commit 876e44b

Browse files
authored
Handle extra file extensions when wild card directory watch is invoked (microsoft#41018)
Fixes microsoft#40495
1 parent 4766a2e commit 876e44b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/compiler/watchPublic.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ namespace ts {
635635

636636
function reloadFileNamesFromConfigFile() {
637637
writeLog("Reloading new file names and options");
638-
const result = getFileNamesFromConfigSpecs(configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost);
638+
const result = getFileNamesFromConfigSpecs(configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
639639
if (updateErrorForNoInputFiles(result, getNormalizedAbsolutePath(configFileName, currentDirectory), configFileSpecs, configFileParsingDiagnostics!, canConfigFileJsonReportNoInputFiles)) {
640640
hasChangedConfigFileParsingErrors = true;
641641
}
@@ -748,6 +748,7 @@ namespace ts {
748748
fileOrDirectoryPath,
749749
configFileName,
750750
configFileSpecs,
751+
extraFileExtensions,
751752
options: compilerOptions,
752753
program: getCurrentBuilderProgram(),
753754
currentDirectory,

src/testRunner/unittests/tscWatch/watchApi.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ namespace ts.tscWatch {
121121
);
122122
const watch = createWatchProgram(watchCompilerHost);
123123
checkProgramActualFiles(watch.getProgram().getProgram(), [mainFile.path, otherFile.path, libFile.path]);
124+
125+
const other2 = `${projectRoot}/other2.vue`;
126+
sys.writeFile(other2, otherFile.content);
127+
checkSingleTimeoutQueueLengthAndRun(sys);
128+
checkProgramActualFiles(watch.getProgram().getProgram(), [mainFile.path, otherFile.path, libFile.path, other2]);
124129
});
125130
});
126131
}

0 commit comments

Comments
 (0)