angular/angular-bazel-example

Using Bazel in Application using Library

Closed this issue · 1 comments

I have an application which uses library generated using "ng generate library" without pushing to npm repository directly from dist. How do I use this library with Bazel from dist?

what you really want is for the deps of your application ng_module to include the ng_module exported by the library. Thus, Bazel builds all the libraries as well as the application and knows how to link them together.

Alternatively, if you have no control over how the library is built, then you should npm link the library's npm package into your repo where Bazel builds the app, so it appears like any other third-party package you fetched from npm.

I'm closing issues in this repo, if you still need help please file a new one in https://github.com/bazelbuild/rules_nodejs/issues
(this example will move to that repo too)