Avoid loading duplicate local+global plugins

This commit is contained in:
Ryan Cavanaugh
2017-04-13 16:17:34 -07:00
parent 3cc379c3c0
commit 19ddc1e94a
+3
View File
@@ -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);
}