How to omit subfolders from node_modules for ngx-extended-pdf-viewer

  angular, angular-json, pdf-viewer

ngx-extended-pdf-viewer allows to omit the subfolders inline-locale-files and additional-locale after copying the entire library assets

 "src/assets",
{
  "glob": "**/*",
  "input": "node_modules/ngx-extended-pdf-viewer/assets/",
  "output": "/assets/"
}

I tried to add ignore in the angular.json, but ignore is not allowed.

{
  "glob": "**/*",
  "input": "node_modules/ngx-extended-pdf-viewer/assets/",
  "ignore": [
    "node_modules/ngx-extended-pdf-viewer/assets/additional-locale",
    "node_modules/ngx-extended-pdf-viewer/assets/inline-locale-files"
  ],
  "output": "/assets/"
}

How can I omit these folders and reduce the language list

Source: Angular Questions

One Reply to “How to omit subfolders from node_modules for ngx-extended-pdf-viewer”

  • You just need to modify the paths in your ignore array. Because you input equal “node_modules/ngx-extended-pdf-viewer/assets/” the glob and ignore properties starts at “node_modules/ngx-extended-pdf-viewer/assets/” so no need to set again the path because it will be “node_modules/ngx-extended-pdf-viewer/assets/node_modules/ngx-extended-pdf-viewer/assets/additional-locale”.

    In other words use this :

    [“additional-locale//*”, “inline-locale-files//*”]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.