mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 05:41:22 -06:00
Handle extra file extensions when wild card directory watch is invoked (#41018)
Fixes #40495
This commit is contained in:
parent
4766a2e5a3
commit
876e44bbc6
@ -635,7 +635,7 @@ namespace ts {
|
||||
|
||||
function reloadFileNamesFromConfigFile() {
|
||||
writeLog("Reloading new file names and options");
|
||||
const result = getFileNamesFromConfigSpecs(configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost);
|
||||
const result = getFileNamesFromConfigSpecs(configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
||||
if (updateErrorForNoInputFiles(result, getNormalizedAbsolutePath(configFileName, currentDirectory), configFileSpecs, configFileParsingDiagnostics!, canConfigFileJsonReportNoInputFiles)) {
|
||||
hasChangedConfigFileParsingErrors = true;
|
||||
}
|
||||
@ -748,6 +748,7 @@ namespace ts {
|
||||
fileOrDirectoryPath,
|
||||
configFileName,
|
||||
configFileSpecs,
|
||||
extraFileExtensions,
|
||||
options: compilerOptions,
|
||||
program: getCurrentBuilderProgram(),
|
||||
currentDirectory,
|
||||
|
||||
@ -121,6 +121,11 @@ namespace ts.tscWatch {
|
||||
);
|
||||
const watch = createWatchProgram(watchCompilerHost);
|
||||
checkProgramActualFiles(watch.getProgram().getProgram(), [mainFile.path, otherFile.path, libFile.path]);
|
||||
|
||||
const other2 = `${projectRoot}/other2.vue`;
|
||||
sys.writeFile(other2, otherFile.content);
|
||||
checkSingleTimeoutQueueLengthAndRun(sys);
|
||||
checkProgramActualFiles(watch.getProgram().getProgram(), [mainFile.path, otherFile.path, libFile.path, other2]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user