Need allowJs to be true to use the json module resolution

This commit is contained in:
Sheetal Nandi
2018-01-26 15:14:48 -08:00
parent a1922fd41f
commit ca590d6fed
18 changed files with 137 additions and 20 deletions

View File

@@ -2037,7 +2037,8 @@ namespace ts {
// Rather than requery this for each file and filespec, we query the supported extensions
// once and store it on the expansion context.
const supportedExtensions = getSupportedExtensions(options, extraFileExtensions);
// When computing file names, do not include json files. Use only module resolution or explicit includes for them
const supportedExtensions = getSupportedExtensions(options, extraFileExtensions, /*excludeJson*/ true);
// Literal files are always included verbatim. An "include" or "exclude" specification cannot
// remove a literal file.