Skip to content

Commit 19ddc1e

Browse files
committed
Avoid loading duplicate local+global plugins
1 parent 3cc379c commit 19ddc1e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/server/project.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,9 @@ namespace ts.server {
885885
}
886886
// Enable global plugins with synthetic configuration entries
887887
for (const globalPluginName of this.projectService.globalPlugins) {
888+
// Skip already-locally-loaded plugins
889+
if (options.plugins.some(p => p.name === globalPluginName)) continue;
890+
888891
// Provide global: true so plugins can detect why they can't find their config
889892
this.enablePlugin({ name: globalPluginName, global: true } as PluginImport, searchPaths);
890893
}

0 commit comments

Comments
 (0)