We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've seen in the docs that unacceptableLicenseTest can be used to blacklist certain licenses.
unacceptableLicenseTest
To be totally safe though I'd like to be able to whitelist certain licenses, so that the build process fails if any other license is found.
Is this possible? Could this be implemented?
The text was updated successfully, but these errors were encountered:
You can do that with unacceptableLicenseTest easily, example that breaks the build if a non-white-listed license are found
const ACCEPTABLE_LICENSE_TYPES = [ 'MIT', 'Apache-2.0', 'ISC', 'BSD-3-Clause' ]; ... new LicenseWebpackPlugin({ ... unacceptableLicenseTest: (licenseType) => !ACCEPTABLE_LICENSE_TYPES.includes(licenseType), handleUnacceptableLicense: (packageName, licenseType) => { console.error("Unacceptable license found: packageName=", packageName, ", licenseType=", licenseType); process.exit(-1); }, ... })
I suggest you handle missing licenses in the same way, eg break the build on that as well.
Sorry, something went wrong.
No branches or pull requests
I've seen in the docs that
unacceptableLicenseTest
can be used to blacklist certain licenses.To be totally safe though I'd like to be able to whitelist certain licenses, so that the build process fails if any other license is found.
Is this possible? Could this be implemented?
The text was updated successfully, but these errors were encountered: