0

I am currently building a tarball npm package via npm:

npm run build-release
npm pack dist/

Afterwards, I use npm install xxx.tgz to install the package in another Angular application. This works fine to use components defined in the first package, but I also need to access .css files defined in the first project.

When I inspect the generated xxx.tgz there is not a single .css file from the project included. How do I tell npm to do so, so in a project installing this package can use varialbes defined in the packages .css files?

Kackao
  • 1,181
  • 3
  • 13
  • 22

1 Answers1

0

CSS is compiled and bundled when you ng build.

To avoid that, you have to declare them as assets. This is done in the angular.json file (you should alreay have the style.css file in an array of assets).