Skip to content

Commit 13a4086

Browse files
kyliauKeen Yee Liau
authored andcommitted
fix: disable AutoImportProviderProject
TypeScript 4.0 added a new feature to provider smarter auto-imports, (see https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#smarter-auto-imports) but feature is not needed in Angular language service. We should turn this off to improve performance.
1 parent 34cdd35 commit 13a4086

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/src/session.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ export class Session {
8383
scriptKind: ts.ScriptKind.External,
8484
},
8585
],
86+
preferences: {
87+
// We don't want the AutoImportProvider projects to be created. See
88+
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-0/#smarter-auto-imports
89+
includePackageJsonAutoImports: 'off',
90+
},
8691
});
8792

8893
projSvc.configurePlugin({

0 commit comments

Comments
 (0)