angular web app - include library licenses

橙三吉。 提交于 2021-01-28 08:00:24

问题


I have an angular-cli with many libraries. To include the licenses for these I include all of the LICENSE and package.json files from node_modules in the build.

"assets": [
    {
        "glob": "**/package.json",
        "input": "../node_modules/",
        "output": "./licenses"
    },
    {
        "glob": "**/LICENSE*",
        "input": "../node_modules/",
        "output": "./licenses"
    }
]

However this adds ~4000 individual files to the output and adds time to the build and upload, and some of the libraries are build/development tools not used in the source. I'm about to zip the licenses in a pre-build process as a quick solution.

This seems like a common issue. Is there a smart tool for this, that packages in a way, only the used licenses?

来源:https://stackoverflow.com/questions/47578837/angular-web-app-include-library-licenses

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!