From 19ddc1e94a85eb5cd6bb941ede1900f3d1e3b910 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 13 Apr 2017 15:51:38 -0700 Subject: [PATCH] Avoid loading duplicate local+global plugins --- src/server/project.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/project.ts b/src/server/project.ts index b79df827b6b..83b65f880e7 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -885,6 +885,9 @@ namespace ts.server { } // Enable global plugins with synthetic configuration entries for (const globalPluginName of this.projectService.globalPlugins) { + // Skip already-locally-loaded plugins + if (options.plugins.some(p => p.name === globalPluginName)) continue; + // Provide global: true so plugins can detect why they can't find their config this.enablePlugin({ name: globalPluginName, global: true } as PluginImport, searchPaths); }