webpack/declarations/plugins/BannerPlugin.d.ts

62 lines
1.2 KiB
TypeScript
Raw Normal View History

/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn special-lint-fix` to update
2018-05-08 12:04:57 +08:00
*/
2018-09-20 16:13:38 +08:00
export type BannerPluginArgument =
| string
2018-09-20 16:13:38 +08:00
| BannerPluginOptions
| BannerFunction;
2018-09-20 16:13:38 +08:00
/**
* The banner as function, it will be wrapped in a comment.
2018-09-20 16:13:38 +08:00
*/
2019-02-05 17:06:32 +08:00
export type BannerFunction = (data: {
2024-03-18 01:15:44 +08:00
hash?: string;
2019-02-05 17:06:32 +08:00
chunk: import("../../lib/Chunk");
filename: string;
}) => string;
/**
* Filtering rules.
*/
2018-05-08 12:04:57 +08:00
export type Rules = Rule[] | Rule;
/**
* Filtering rule as regex or string.
*/
2018-09-21 14:39:15 +08:00
export type Rule = RegExp | string;
2018-09-20 16:13:38 +08:00
export interface BannerPluginOptions {
/**
* Specifies the banner.
2018-09-20 16:13:38 +08:00
*/
banner: string | BannerFunction;
2018-09-20 16:13:38 +08:00
/**
* If true, the banner will only be added to the entry chunks.
2018-09-20 16:13:38 +08:00
*/
entryOnly?: boolean;
/**
* Exclude all modules matching any of these conditions.
2018-09-20 16:13:38 +08:00
*/
exclude?: Rules;
2022-04-02 02:29:34 +08:00
/**
* If true, banner will be placed at the end of the output.
*/
footer?: boolean;
2018-09-20 16:13:38 +08:00
/**
* Include all modules matching any of these conditions.
2018-09-20 16:13:38 +08:00
*/
include?: Rules;
/**
* If true, banner will not be wrapped in a comment.
2018-09-20 16:13:38 +08:00
*/
raw?: boolean;
/**
* Specifies the stage when add a banner.
*/
stage?: number;
2018-09-20 16:13:38 +08:00
/**
* Include all modules that pass test assertion.
2018-09-20 16:13:38 +08:00
*/
test?: Rules;
}