-
Notifications
You must be signed in to change notification settings - Fork 12k
enable declarationMap in workspace libraries #17888
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
Comments
|
Actually let's re-open this, since it's slightly different but block it on ng-packagr/ng-packagr#1464 |
Also, this needs some digging to see if it's even useful since we don't use project references. |
I included these files in my npm package:
When I use this npm library, I can jump directly to the ts source code by VSCode Go to Definition, which is very convenient. |
Also, should we use Project References in angular? |
No, the Angular CLI / Compiler don't support composite projects. I do see, that they can be useful in a monorepo, however, when shipping a library I don't think that dts maps will add any value unless you also ship the typescript source files. |
We had a chat around this yesterday and we decided that we should enable |
…ilds With this change we enable emitting declaration maps when building libraries to be consumed locally as this improved DX as this will allow editors to go to the original typescript file when using `Go to Definition`. For production builds, declaration maps are disabled because they are not useful since the source files are not included in the distributable package. Closes #17888
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. |
🚀 Feature request
Command (mark with an
x
)Description
see https://www.typescriptlang.org/v2/tsconfig#declarationMap
ng generate library my-lib
will add path mapping in tsconfig.json. So we should enable declarationMapThe text was updated successfully, but these errors were encountered: