-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
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
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"compileOnSave": false, | ||
"compilerOptions": { | ||
"baseUrl": "./", | ||
"outDir": "./dist/out-tsc",<% if (strict) { %> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
alan-agius4
Author
Collaborator
|
||
"outDir": "./dist",<% if (strict) { %> | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
|
Hi @alan-agius4 can I ask you why did you remove the /out-tsc from the "outDir" param in the root tsconfig.json?
I think that it's not related to your changes in updateTsConfig because this is NOT used to pass the value to distRoot parameter as you can see from the source
const distRoot = `dist/${folderName}`;
L194 that is passed in the calloptions.skipTsConfig ? noop() : updateTsConfig(packageName, distRoot),
L217 so I don't understand why it's needed?This cause a regression in VSCode when you create a new workspace with a library project and you run a script that do a build --watch of that library. VSCode loose the reference of imports pointing to library dist!
Can you please give some clarification?
I'll later open an issue to repro the failing behaviour in VSCode and if needed I'll try to fix it with a PR that revert the old path in tsconfig.json.