webpack/declarations/plugins/container/ContainerPlugin.d.ts

147 lines
3.5 KiB
TypeScript
Raw Normal View History

/**
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn special-lint-fix` to update
*/
/**
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
*/
export type Exposes =
| Exposes[]
| string
| {
[k: string]: Exposes;
};
/**
* Add a comment in the UMD wrapper.
*/
export type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
/**
2020-03-18 17:01:20 +08:00
* Specify which export should be exposed as library.
*/
2020-04-14 18:51:49 +08:00
export type LibraryExport = string[] | string;
/**
2020-03-18 17:01:20 +08:00
* The name of the library (some types allow unnamed libraries too).
*/
2020-04-14 18:51:49 +08:00
export type LibraryName = string[] | string | LibraryCustomUmdObject;
/**
2020-03-18 17:01:20 +08:00
* Type of library.
*/
export type LibraryType =
| "var"
| "module"
| "assign"
| "this"
| "window"
| "self"
| "global"
| "commonjs"
| "commonjs2"
| "commonjs-module"
| "amd"
| "amd-require"
| "umd"
| "umd2"
| "jsonp"
| "system";
/**
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
*/
export type UmdNamedDefine = boolean;
2020-03-18 17:01:20 +08:00
/**
* Modules in this container that should be able to be overridden by the host. When provided, property name is used as override key, otherwise override key is automatically inferred from request.
2020-03-18 17:01:20 +08:00
*/
export type Overridables =
| Overridables[]
| string
| {
[k: string]: Overridables;
};
export interface ContainerPluginOptions {
/**
* Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
*/
exposes: Exposes;
/**
* The filename for this container relative path inside the `output.path` directory.
*/
filename?: string;
/**
2020-03-18 17:01:20 +08:00
* Options for library.
*/
library?: LibraryOptions;
/**
2020-03-18 17:01:20 +08:00
* The name for this container.
*/
name: string;
/**
* Modules in this container that should be able to be overridden by the host. When provided, property name is used as override key, otherwise override key is automatically inferred from request.
*/
overridables?: Overridables;
}
/**
2020-03-18 17:01:20 +08:00
* Options for library.
*/
export interface LibraryOptions {
/**
* Add a comment in the UMD wrapper.
*/
auxiliaryComment?: AuxiliaryComment;
/**
2020-03-18 17:01:20 +08:00
* Specify which export should be exposed as library.
*/
export?: LibraryExport;
/**
2020-03-18 17:01:20 +08:00
* The name of the library (some types allow unnamed libraries too).
*/
name?: LibraryName;
/**
2020-03-18 17:01:20 +08:00
* Type of library.
*/
type: LibraryType;
/**
* If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
*/
umdNamedDefine?: UmdNamedDefine;
}
/**
* Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
*/
export interface LibraryCustomUmdCommentObject {
/**
2020-03-18 17:01:20 +08:00
* Set comment for `amd` section in UMD.
*/
amd?: string;
/**
2020-03-18 17:01:20 +08:00
* Set comment for `commonjs` (exports) section in UMD.
*/
commonjs?: string;
/**
2020-03-18 17:01:20 +08:00
* Set comment for `commonjs2` (module.exports) section in UMD.
*/
commonjs2?: string;
/**
2020-03-18 17:01:20 +08:00
* Set comment for `root` (global variable) section in UMD.
*/
root?: string;
}
/**
2020-03-18 17:01:20 +08:00
* Description object for all UMD variants of the library name.
*/
export interface LibraryCustomUmdObject {
/**
2020-03-18 17:01:20 +08:00
* Name of the exposed AMD library in the UMD.
*/
amd?: string;
/**
2020-03-18 17:01:20 +08:00
* Name of the exposed commonjs export in the UMD.
*/
commonjs?: string;
/**
2020-03-18 17:01:20 +08:00
* Name of the property exposed globally by a UMD library.
*/
2020-04-14 18:51:49 +08:00
root?: string[] | string;
}