Rush StackShopBlogEvents
Skip to main content

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

generatedLicenseFilename?

LicenseFileName

(BETA) (Optional) Name of the generated license file. Defaults to THIRD-PARTY-NOTICES.html

generateLicenseFile?

boolean

(BETA) (Optional) Whether to generate a license file. Defaults to false and will only generate the embedded-dependencies.json file

generateLicenseFileFunction?

LicenseFileGeneratorFunction

(BETA) (Optional) Function that generates the license file. Defaults to the plugin's internal default generator function but allows you to override it

outputFileName?

string

(BETA) (Optional) Name of the file to be generated. Defaults to embedded-dependencies.json

packageFilterPredicate?

(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.