mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 21:37:41 -06:00
Changed further defaults to CommonJS
(cherry picked from commit 0e5a93b85aa6f6fa2f6d93870fa54c107fc1c566)
This commit is contained in:
parent
3cf96529e7
commit
ef90492f29
@ -49,7 +49,7 @@ namespace ts {
|
||||
|
||||
const compilerOptions = host.getCompilerOptions();
|
||||
const languageVersion = compilerOptions.target || ScriptTarget.ES3;
|
||||
const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None;
|
||||
const modulekind = compilerOptions.module ? compilerOptions.module : languageVersion === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.CommonJS;
|
||||
const allowSyntheticDefaultImports = typeof compilerOptions.allowSyntheticDefaultImports !== "undefined" ? compilerOptions.allowSyntheticDefaultImports : modulekind === ModuleKind.System;
|
||||
|
||||
const emitResolver = createResolver();
|
||||
|
||||
@ -2013,7 +2013,7 @@ namespace ts {
|
||||
export function getEmitModuleKind(compilerOptions: CompilerOptions) {
|
||||
return compilerOptions.module ?
|
||||
compilerOptions.module :
|
||||
getEmitScriptTarget(compilerOptions) === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.None;
|
||||
getEmitScriptTarget(compilerOptions) === ScriptTarget.ES6 ? ModuleKind.ES6 : ModuleKind.CommonJS;
|
||||
}
|
||||
|
||||
export interface EmitFileNames {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user