问题
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