diff --git a/src/server/project.ts b/src/server/project.ts index 0475a0f6d6a7b..e685f111b39e7 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -1569,8 +1569,8 @@ namespace ts.server { protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map | undefined) { this.projectService.logger.info(`Enabling plugin ${pluginConfigEntry.name} from candidate paths: ${searchPaths.join(",")}`); - if (parsePackageName(pluginConfigEntry.name).rest) { - this.projectService.logger.info(`kipped loading plugin ${pluginConfigEntry.name} because only package name is allowed plugin name`); + if (!pluginConfigEntry.name || parsePackageName(pluginConfigEntry.name).rest) { + this.projectService.logger.info(`Skipped loading plugin ${pluginConfigEntry.name} because only package name is allowed plugin name`); return; } diff --git a/src/testRunner/unittests/tsserver/plugins.ts b/src/testRunner/unittests/tsserver/plugins.ts index 4cd692f0576d6..0af8f57e21519 100644 --- a/src/testRunner/unittests/tsserver/plugins.ts +++ b/src/testRunner/unittests/tsserver/plugins.ts @@ -24,7 +24,12 @@ namespace ts.projectSystem { const tsconfig: File = { path: "/tsconfig.json", content: JSON.stringify({ - compilerOptions: { plugins: [...expectedToLoad, ...notToLoad].map(name => ({ name })) } + compilerOptions: { + plugins: [ + ...[...expectedToLoad, ...notToLoad].map(name => ({ name })), + { transform: "some-transform" } + ] + } }) }; const { host, pluginsLoaded } = createHostWithPlugin([aTs, tsconfig, libFile]);