mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Prioritize loading plugin from probeLocations over peer node_modules
This commit reoroders the loading sequence of a tsserver plugin. It should first check `pluginProbeLocations` before checking peer node_modules. PR closes https://github.com/microsoft/TypeScript/issues/34616
This commit is contained in:
parent
6f04f526d4
commit
f689982c9f
@ -1359,9 +1359,12 @@ namespace ts.server {
|
||||
return;
|
||||
}
|
||||
|
||||
// Search our peer node_modules, then any globally-specified probe paths
|
||||
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/
|
||||
const searchPaths = [combinePaths(this.projectService.getExecutingFilePath(), "../../.."), ...this.projectService.pluginProbeLocations];
|
||||
// Search any globally-specified probe paths, then our peer node_modules
|
||||
const searchPaths = [
|
||||
...this.projectService.pluginProbeLocations,
|
||||
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/
|
||||
combinePaths(this.projectService.getExecutingFilePath(), "../../.."),
|
||||
];
|
||||
|
||||
if (this.projectService.globalPlugins) {
|
||||
// Enable global plugins with synthetic configuration entries
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user