Prepends or appends banner text to emitted assets that match the configured file filters.
new BannerPlugin(options): BannerPluginAttributes
options:
<BannerPluginArgument>options object
Returns:
<BannerPlugin>Normalizes banner options and compiles the configured banner source into a function that can render per-asset banner text.
banner{(data: { chunk: Chunk; filename: string; hash?: string }) => string}options<BannerPluginOptions>
apply(compiler): voidAttributes
compiler:
<Compiler>the compiler instance
Returns:
<void>Validates the configured options and injects rendered banner comments into matching compilation assets at the configured process-assets stage.
Type:
{string | BannerPluginOptions | ((data: { chunk: Chunk; filename: string; hash?: string }) => string)}
banner{string | ((data: { chunk: Chunk; filename: string; hash?: string }) => string)} Specifies the banner.entryOnly<boolean>If true, the banner will only be added to the entry chunks.exclude<string>|<RegExp>| (str:<string>) =><boolean>|<Rule>[] Exclude all modules matching any of these conditions.footer<boolean>If true, banner will be placed at the end of the output.include<string>|<RegExp>|<Rule>[] | (str:<string>) =><boolean>Include all modules matching any of these conditions.raw<boolean>If true, banner will not be wrapped in a comment.stage<number>Specifies the stage when add a banner.test<string>|<RegExp>|<Rule>[] | (str:<string>) =><boolean>Include all modules that pass test assertion.