0

I've built an angular component library in which I use bootstrap-icons. In the same NX workspace there's an application where I'm using this component, and this works fine:

angular library woff files end up in application dist

The woff-files from bootstrap-icons end up in the application dist-folder. However, when I create a seperate application (example), where I use this component, it seems that the woff-files from bootstrap-icons don't end up in the dist-folder.

New project its dist-folder

ng-bootstrap inside the node_modules folder

bootstrap-icons inside the node_modules folder)

This is how I reference bootstrap-icons from my angular library:

enter image description here

I'm able to specify that assets should be shipped inside my node-module, however in this case I have to refer to assets from another node-module...

Attempts

  • Just include the folder into the applications assets

Just include the folder into the applications assets

  • Modify the library ng-package.json to copy over files from the node_modules to the library output:

enter image description here

Result:

enter image description here

Since the files don't even end up in the dist-folder, I hasn't got anything to do with the webserver configuration

Why are these files not ending up in my dist-folder? How can I make this work as expected?

EDIT

I just tried an example from the official git repository like this:

project.json

{
  ...,
  "targets": {
    "build": {
      ...,
      "assets": [{
        "glob": "**/*",
        "input": "libs/mintplayer-ng-bootstrap/src/assets/**",
        "output": "assets"
      }]
    }
  }
}

But it doesn't work. I tried all sorts of things by now...

Pieterjan
  • 2,738
  • 4
  • 28
  • 55

0 Answers0