-
Notifications
You must be signed in to change notification settings - Fork 12k
Incorrect tsconfig path for libraries #10369
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
@tobi-or-not-tobi Doesn't this make ng-packagr embed this files in the builded library ? Anyway, given the comment by @dherges (angular/devkit#730 (comment)), we could respond to this by adding some consistent "continuous library build" process. I'm on this right now for a project, so I may make a PR to angular-cli or devkit soon enough if I have time. |
Thanks @noelmace, let's keep the discussion in the devkit project. |
In fact, I don't know what's the angular-cli politic about issues related to both angular-cli and devkit (this is the case here angular/devkit#730 (comment)). @hansl @filipesilva @Brocco, do you have an opinion about opening separated issues for devkit and angular-cli vs keeping the discussion in one project only ? Should a devkit issue considered has external ? |
This commit is just a first example for angular#10369, following the discussion started in angular/devkit#730. angular/devkit#739 would be needed. This example would also require some evolutions on @angular-devkit/architect, but I'm sure there is a way to do this.
This commit is just a first example for angular#10369, following the discussion started in angular/devkit#730. angular/devkit#739 would be needed. This example would also require some evolutions on @angular-devkit/architect, but I'm sure there is a way to do this.
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. |
Versions
Angular CLI: 6.0.0-rc.5
Repro steps
import library module into main AppModule:
import { MylibModule } from 'mylib';
Observed behavior
I'm exited by the new generation of libraries in the CLI. But I didn't got it to work initially. While the creation of build of the library seems to be taken care of, the integration into the main app seems to be missing. I believe this is caused by an incorrect reference in the path setup in the tsconfig.json, as it is configured with the following after creation of the library:
This requires an initial build to have a generated dist/mylib folder in the first place, but would also require to continuously rebuild the library upon changes.
After I change the path to the src folder:
I'm able to include the module without building, but also have a seamless experience upon any changes in my library component.
I know the public_api has been originated from the ng-packagr, but i'm wondering if we shouldn't change this into an ordinary index.ts, as it would make the import easier. in addition, if that file could live at the root of our generated library, the import could be shorten to
"mylib": ["projects/mylib"]
Desired behavior
The text was updated successfully, but these errors were encountered: