new DefinePlugin(definitions): DefinePluginAttributes
definitions:
<Definitions>A map of global object definitions
Returns:
<DefinePlugin>Create a new define plugin
Attributes
definitions:
<Definitions>apply(compiler): voidAttributes
compiler:
<Compiler>the compiler instance
Returns:
<void>Applies the plugin by registering its hooks on the compiler.
Attributes
compilation:
<Compilation>the compilation
Returns:
<DefinePluginHooks>the attached hooks
Returns the attached hooks.
fn{(value: { key: string; module: NormalModule; version: ValueCacheVersion }) => CodeValuePrimitive} generator functionoptions<true>|<string>[] |<RuntimeValueOptions>options- Returns:
<RuntimeValue>runtime 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>[]}
definitions<SyncWaterfallHook><<[Record<string, CodeValue>]>,<Record><<string>,<CodeValue>>>
[index: {string}]<CodeValue>
Type:
{{ [index: string]: RecursiveArrayOrRecord
} | RecursiveArrayOrRecord
[] | T}