mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:34:35 -06:00
Changed node_modules and module defaults
This commit is contained in:
parent
1256352872
commit
b791fd89cd
@ -525,7 +525,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");
|
||||
|
||||
|
||||
@ -1712,7 +1712,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
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user