How to build and publish an Angular module
Cyrille Tuzi

Thanks for the write-up! This seems to work really well for top level items. I am running into an issue however, that I believe is related to the rollup setup.

If my library has multiple services, and internally one depends on another, the internal dependencies don’t appear to be injected properly when the module is imported into another project.

After packaged and packed it as an npm module, I installed it into another project. When I go to use a service from my module, (that depends on another exported service from that module), the internal dependency is undefined and it fails.

I am trying to track this down, and I created a dummy repro of this here:

Steps to reproduce:

git clone
cd ngx-dev-utils
git checkout -b origin internal-dep-bug
npm install
npm run clean:build
cd dist
npm pack
cd ../to/other/project
npm install ../ngx-dev-utils/dist/ngx-dev-utils-1.0.0.tgz

then try to use the TestService somewhere

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.