Unable to import library from node_modules #159
Description
One of our apps uses @angular/material
, but due to angular/components#9502 we can't currently build this with Bazel. A newer app is attempting to use VMware's Clarity.
I get different errors when trying to reproduce this, it seems that the ng_module
rule doesn't include ngfactory.js
files as action inputs.
Error: Could not resolve ./clr-angular.ngfactory from /private/var/tmp/_bazel_matt/33fa3ed25498f03fdeb092569b0649b6/sandbox/darwin-sandbox/5/execroot/haystack/node_modules/@clr/angular/clr-angular.d.ts
Changing ng_module.bzl
to include them allows the app to build, but causes the devserver to not be able to find the file, as I guess there is now a requirement for it to be served.
What is the right way to import libraries using the ng_module rules? The example repo shows the use of ngrx, but this doesn't have references to the ngfactory as part of the ngsummary.
Not sure if I should be opening issue against this repo or the angular one, happy to make an issue over there if needed.