new DefinePlugin(definitions): DefinePluginAttributes
definitions:
DefinitionsA map of global object definitions
Returns:
DefinePluginCreate a new define plugin
Attributes
definitions:
Definitionsapply(compiler): voidAttributes
Applies the plugin by registering its hooks on the compiler.
Attributes
compilation:
Compilationthe compilation
Returns:
DefinePluginHooksthe attached hooks
Returns the attached hooks.
Attributes
fn:
(value: { key: string; module: NormalModule; version: ValueCacheVersion }) => CodeValuePrimitivegenerator function
options:
true | string[] | RuntimeValueOptionsoptions
Returns:
RuntimeValueruntime value
Returns runtime value.
Type:
undefined | null | string | number | bigint | boolean | Function | RegExp | RuntimeValue | { [index: string]: RecursiveArrayOrRecord<string | number | bigint | boolean | Function | RegExp | RuntimeValue | null | undefined> } | RecursiveArrayOrRecord<undefined | null | string | number | bigint | boolean | Function | RegExp | RuntimeValue>[]Attributes
[index: {string}]CodeValue
Type:
{ [index: string]: RecursiveArrayOrRecord<T> } | RecursiveArrayOrRecord<T>[] | T