Skip to content

Commit 0e5a93b

Browse files
committed
Changed further defaults to CommonJS
1 parent b791fd8 commit 0e5a93b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compiler/checker.ts

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

5050
const compilerOptions = host.getCompilerOptions();
5151
const languageVersion = compilerOptions.target || ScriptTarget.ES3;
52-
const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None;
52+
const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.CommonJS;
5353
const allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ModuleKind.System;
5454

5555
const emitResolver = createResolver();

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2013,7 +2013,7 @@ namespace ts {
20132013
export function getEmitModuleKind(compilerOptions: CompilerOptions) {
20142014
return compilerOptions.module ?
20152015
compilerOptions.module :
2016-
getEmitScriptTarget(compilerOptions) === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None;
2016+
getEmitScriptTarget(compilerOptions) === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.CommonJS;
20172017
}
20182018

20192019
export interface EmitFileNames {

0 commit comments

Comments
 (0)