mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Changed node_modules and module defaults
(cherry picked from commit b791fd89cd)
This commit is contained in:
@@ -551,7 +551,21 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
const filesSeen: Map<boolean> = {};
|
||||
const exclude = json["exclude"] instanceof Array ? map(<string[]>json["exclude"], normalizeSlashes) : undefined;
|
||||
|
||||
let exclude: string[] = [];
|
||||
if(json["exclude"] instanceof Array){
|
||||
exclude = json["exclude"];
|
||||
}
|
||||
else {
|
||||
// by default exclude node_modules, and any specificied output directory
|
||||
exclude = ["./node_modules"]
|
||||
let outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
|
||||
if(outDir) {
|
||||
exclude.push(outDir);
|
||||
}
|
||||
}
|
||||
exclude = map(exclude, normalizeSlashes);
|
||||
|
||||
const supportedExtensions = getSupportedExtensions(options);
|
||||
Debug.assert(indexOf(supportedExtensions, ".ts") < indexOf(supportedExtensions, ".d.ts"), "Changed priority of extensions to pick");
|
||||
|
||||
|
||||
@@ -1713,7 +1713,7 @@ namespace ts {
|
||||
// Always default to "ScriptTarget.ES5" for the language service
|
||||
return {
|
||||
target: ScriptTarget.ES5,
|
||||
module: ModuleKind.None,
|
||||
module: ModuleKind.CommonJS,
|
||||
jsx: JsxEmit.Preserve
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user