Are you an LLM? You can read better optimized documentation at /reference/OutputOptions.banner.md for this page in Markdown format
banner
- Type:
optionalbanner:string| (chunk) =>string|Promise<string>
Defined in: options/output-options.ts:226
A string to prepend to the bundle before renderChunk hook.
See output.intro, output.postBanner as well.
WARNING
When using output.banner with minification enabled, the banner content may be stripped out unless it is formatted as a legal comment. To ensure your banner persists through minification, do either:
- Use
output.postBannerinstead, which are added after minification, or - Use one of these comment formats:
- Comments starting with
/*!(e.g.,/*! My banner */) - Comments containing
@license(e.g.,/* @license My banner */) - Comments containing
@preserve(e.g.,/* @preserve My banner */) - Comments starting with
//!(for single-line comments)
- Comments starting with
The latter way's behavior is controlled by the output.legalComments option, which defaults to 'inline' and preserves these special comment formats.