Skip to content

Commit 3bdad8a

Browse files
committed
When excluding same base name file from compilation, check for all supported javascript extensions instead of just .js
1 parent 0b21540 commit 3bdad8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ namespace ts {
517517

518518
// If this is one of the output extension (which would be .d.ts and .js if we are allowing compilation of js files)
519519
// do not include this file if we included .ts or .tsx file with same base name as it could be output of the earlier compilation
520-
if (extension === ".d.ts" || (options.allowJs && extension === ".js")) {
520+
if (extension === ".d.ts" || (options.allowJs && contains(supportedJavascriptExtensions, extension))) {
521521
const baseName = fileName.substr(0, fileName.length - extension.length);
522522
if (hasProperty(filesSeen, baseName + ".ts") || hasProperty(filesSeen, baseName + ".tsx")) {
523523
continue;

0 commit comments

Comments
 (0)