2020-05-12 21:58:14 +08:00
|
|
|
/*
|
2018-09-18 19:57:44 +08:00
|
|
|
* 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 =
|
2020-03-26 16:48:21 +08:00
|
|
|
| string
|
2018-09-20 16:13:38 +08:00
|
|
|
| BannerPluginOptions
|
2020-03-26 16:48:21 +08:00
|
|
|
| BannerFunction;
|
2018-09-20 16:13:38 +08:00
|
|
|
/**
|
2020-03-09 21:14:44 +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: {
|
|
|
|
hash: string;
|
|
|
|
chunk: import("../../lib/Chunk");
|
|
|
|
filename: string;
|
|
|
|
}) => string;
|
2020-02-17 19:14:51 +08:00
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* Filtering rules.
|
2020-02-17 19:14:51 +08:00
|
|
|
*/
|
2018-05-08 12:04:57 +08:00
|
|
|
export type Rules = Rule[] | Rule;
|
2020-02-17 19:14:51 +08:00
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* Filtering rule as regex or string.
|
2020-02-17 19:14:51 +08:00
|
|
|
*/
|
2018-09-21 14:39:15 +08:00
|
|
|
export type Rule = RegExp | string;
|
2018-09-20 16:13:38 +08:00
|
|
|
|
|
|
|
export interface BannerPluginOptions {
|
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* Specifies the banner.
|
2018-09-20 16:13:38 +08:00
|
|
|
*/
|
2020-03-26 16:48:21 +08:00
|
|
|
banner: string | BannerFunction;
|
2018-09-20 16:13:38 +08:00
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* If true, the banner will only be added to the entry chunks.
|
2018-09-20 16:13:38 +08:00
|
|
|
*/
|
|
|
|
entryOnly?: boolean;
|
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* 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
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* Include all modules matching any of these conditions.
|
2018-09-20 16:13:38 +08:00
|
|
|
*/
|
|
|
|
include?: Rules;
|
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* If true, banner will not be wrapped in a comment.
|
2018-09-20 16:13:38 +08:00
|
|
|
*/
|
|
|
|
raw?: boolean;
|
|
|
|
/**
|
2020-03-09 21:14:44 +08:00
|
|
|
* Include all modules that pass test assertion.
|
2018-09-20 16:13:38 +08:00
|
|
|
*/
|
|
|
|
test?: Rules;
|
|
|
|
}
|