From 31f5502f2b4ae4e4ad1253c0f63b5e0241c8447f Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 21 Jan 2016 16:05:44 -0800 Subject: [PATCH] set default module to commonjs for jsconfig.json --- src/compiler/commandLineParser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 2e6727749f1..733e3158593 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -552,6 +552,7 @@ namespace ts { const errors: Diagnostic[] = []; if (configFileName && getBaseFileName(configFileName) === "jsconfig.json") { + options.module = ModuleKind.CommonJS; options.allowJs = true; }