Home > @rushstack/webpack-embedded-dependencies-plugin > IEmbeddedDependenciesWebpackPluginOptions
IEmbeddedDependenciesWebpackPluginOptions interface
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Plugin options for EmbeddedDependenciesWebpackPlugin
Signature:
export interface IEmbeddedDependenciesWebpackPluginOptions
Example
// webpack.config.js
plugins: [
new EmbeddedDependenciesWebpackPlugin({
outputFileName: 'custom-file-name.json',
generateLicenseFile: true,
generateLicenseFileFunction: (packages: IPackageData[]) => {
return packages
.map((pkg) => {
return `<h2>${pkg.name}</h2><p>${pkg.license}</p>`;
}).join('');
},
generatedLicenseFilename: 'custom-license-file-name.html'
})
]
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(BETA) (Optional) Name of the generated license file. Defaults to THIRD-PARTY-NOTICES.html | |||
boolean | (BETA) (Optional) Whether to generate a license file. Defaults to false and will only generate the embedded-dependencies.json file | ||
(BETA) (Optional) Function that generates the license file. Defaults to the plugin's internal default generator function but allows you to override it | |||
string | (BETA) (Optional) Name of the file to be generated. Defaults to embedded-dependencies.json | ||
(packageJson: IPackageData, filePath: string) => boolean | (BETA) (Optional) Predicate function that determines whether a package should be included in the embedded dependencies file or the generated license file. |