-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Regression problem in tsconfig.json outDir that cause VSCode showing errors in all import from libs pointed with paths under /dist/... #16708
Milestone
Comments
damianog
referenced
this issue
Jan 19, 2020
Currently the library schematic doesn't support adding a secondary entry-point and having deep imports is not recommanded. It's best if paths are more stricter when having a secondary entry-point instead of a wildcard. Instead of : ``` "lib/*": [ "dist/lib/*" ] ``` Users should configure: ``` "lib/secondary": [ "dist/lib/secondary" ] ``` This would allow a better DX experience when using auto imports in IDE's. Closes: #15952
dmorosinotto
added a commit
to dmorosinotto/angular-cli
that referenced
this issue
Jan 19, 2020
Regression in tsconfig.json set `"outDir": "./dist/out-tsc"` for problems in VSCode TS(2307) when building library referred in tsconfig "paths" Closes: angular#16708
dmorosinotto
added a commit
to dmorosinotto/angular-cli
that referenced
this issue
Jan 19, 2020
fix(@schematics/angular): regression tsconfig.json … Unverified 0e318ae Regression in tsconfig.json set `"outDir": "./dist/out-tsc"` for problems in VSCode TS(2307) when building library referred in tsconfig "paths" Closes: angular#16708
dmorosinotto
changed the title
Regression problem in tsconfig.json outDir that cause VSCode showing errors in all import form libs poited with paths under /dist/...
Regression problem in tsconfig.json outDir that cause VSCode showing errors in all import from libs pointed with paths under /dist/...
Jan 22, 2020
kyliau
pushed a commit
that referenced
this issue
Jan 24, 2020
* fix(@schematics/angular): regression tsconfig.json fix(@schematics/angular): regression tsconfig.json … Unverified 0e318ae Regression in tsconfig.json set `"outDir": "./dist/out-tsc"` for problems in VSCode TS(2307) when building library referred in tsconfig "paths" Closes: #16708 * fix(@schematics/angular): regression tsconfig.json Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's. Closes #16709 * fix(@schematics/angular): regression tsconfig.json Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's. Fix code lint. Closes #16709 * fix(@schematics/angular): regression tsconfig.json Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's. Fix test code to conform new behaviour. Closes #16709
kyliau
pushed a commit
that referenced
this issue
Jan 24, 2020
* fix(@schematics/angular): regression tsconfig.json fix(@schematics/angular): regression tsconfig.json … Unverified 0e318ae Regression in tsconfig.json set `"outDir": "./dist/out-tsc"` for problems in VSCode TS(2307) when building library referred in tsconfig "paths" Closes: #16708 * fix(@schematics/angular): regression tsconfig.json Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's. Closes #16709 * fix(@schematics/angular): regression tsconfig.json Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's. Fix code lint. Closes #16709 * fix(@schematics/angular): regression tsconfig.json Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's. Fix test code to conform new behaviour. Closes #16709 (cherry picked from commit 3aacf41)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐞 Bug report
Command
Is this a regression?
Yes, the previous version in which this bug was not present was: 8.3.23
Description
The root tsconfig.json used in the new v9.0.0-rc* template point
"outDir": "./dist"
That caused annoying problem in VSCode when you rebuild libs referred by
"paths"
all the code
imports {...} from lib
is marked as Errors by TS because they are build under/dist/...
🔬 Minimal Reproduction
Run those commands:
The above commands are needed to setup the workspace for the repro with an application and a library pointed in the tsconfig.json
"paths": { "my-lib": ["dist/my-lib"] }
then add this line to app.module.ts to use the library inside the application:
and then run the compilation of the my-lib project in watch mode:
You will see in VSCode that all imports pointing to the my-lib will be signal as TS Errors 2307
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
I tested this issue using VSCode and it is related to latest CLI v9.0.0-rc, but the same behaviour is CORRETLY WORKING without any issue in the previous CLI v8 (tested and works on ~8.2.23)
The text was updated successfully, but these errors were encountered: