Include libraries licenses in production build - angular

Viewed 593

Our angular app has many dependencies (node_modules) usually licensed under Apache 2.0 or MIT. As far as I understand the licenses - production build is a "derived work" and we have to include copyright notices in it.

I know, that I can copy them by a script or include them in an angular.json file (like this: angular web app - include library licenses), but I was looking for a solution recommended by angular developers. I believe that this problem is very common, but can't find a lot of topics about it.

Maybe we are wrong and angular applications using dependencies do NOT need to include copyright notices?

1 Answers

In your angular.json file in the configurations section, you can add 'extractLicenses' and set it true for any configuration you want. This will extract all the licenses and add to a single file

Related