Angular - Include librairie files in root application

67 views Asked by At

I have a librairie which have a js folder, which contains multiples js files.

When I build it, I success to include all files in builded librairie. So, files are on dist/my-lib/lib/js.

But, I cannot access to those files from URL via http://localhost:4200/lib/js for example. How can I do ?

1

There are 1 answers

0
Elikill58 On BEST ANSWER

You can include the needed folder from dist to what you want, thanks to assets.

Angular.json:

{
  "projects": {
    "my-app": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              "dist/my-lib/lib/js"
            ]
          }
        }
      }
    }
  }
}