-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution-style tsconfig breaks quick fix and auto import #39488
Comments
I think there might be a call stack on #39048 (comment) |
This is more likely an issue in the VSCode angular language service extensions then a TypeScript issue |
Had same issue when tried to configure TS to follow Webpack entry points, and it shouldn't be related to solution style config because this behavior can be achieved with single If you only have More broad |
The issue here seems to be that tsconfig.app.json does not include new file into the configured project as it explicitly lists files that should be and till you import new file it wont be part of the configured project. The issue is with configuration file and how it is structured. |
I think this issue is also due to the example I provide here: https://github.com/microsoft/vscode/issues/103087 WIth a repro of the problem here: https://github.com/bradennapier/typescript-auto-import-bug tl;dr - outDir is used for auto imports instead of the src directory and that breaks things - especially when using |
Is there ANY work being done to fix the auto-import / import issue? I've seen this problem referenced in a half dozen issues, but nothing is happening, and everyone pointing fingers (It's Angular's problem, it's VSCode's problem, it's Typescript's problem) |
Issue Type: Bug
In Angular 10, they introduced "solution-style" tsconfig files: https://angular.io/guide/migration-solution-style-tsconfig
This, however, seems to break auto importing of files and classes, and the quick-fixes for adding imports:
Note that it's showing "no quick fixes available" .. that should be, and it used to be (something like) "... add import of Contact ...". Or ideally, it would have automatically added the import line as soon as I typed line 13.
In the tsconfig.app.json, a standard Angular 10 app has:
Once I changed the include like to be:
The quick fix now works, as well as the auto-import of the file:
ALSO AN ISSUE ON Code - Insiders
VS Code version: Code - Exploration 1.48.0-exploration (8ac8b3ab28f8687fbd491bbe24cd9ad52514da55, 2020-07-06T06:45:05.955Z)
OS version: Darwin x64 19.5.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (17)
(5 theme extensions excluded)
The text was updated successfully, but these errors were encountered: