enable non-ts extensions in inferred projects by default

This commit is contained in:
Vladimir Matveev
2016-10-27 14:52:09 -07:00
parent fdcc7cc185
commit fdb3b6857d
3 changed files with 39 additions and 1 deletions

View File

@@ -298,6 +298,9 @@ namespace ts.server {
setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.ExternalProjectCompilerOptions): void {
this.compilerOptionsForInferredProjects = convertCompilerOptions(projectCompilerOptions);
// always set 'allowNonTsExtensions' for inferred projects since user cannot configure it from the outside
// previously we did not expose a way for user to change these settings and this option was enabled by default
this.compilerOptionsForInferredProjects.allowNonTsExtensions = true;
this.compileOnSaveForInferredProjects = projectCompilerOptions.compileOnSave;
for (const proj of this.inferredProjects) {
proj.setCompilerOptions(this.compilerOptionsForInferredProjects);