On this page

new DefinePlugin(definitions): DefinePlugin
Attributes
definitions:Definitions
A map of global object definitions
Returns:DefinePlugin

Create a new define plugin

Attributes
definitions:Definitions
apply(compiler): void
Attributes
compiler:Compiler
the compiler instance
Returns:void

Applies the plugin by registering its hooks on the compiler.


Attributes
compilation:Compilation
the compilation
the attached hooks

Returns the attached hooks.


Attributes
fn:(value: { key: string; module: NormalModule; version: ValueCacheVersion }) => CodeValuePrimitive
generator function
options:true | string[] | RuntimeValueOptions
options
Returns:RuntimeValue
runtime value

Returns runtime value.


Attributes
definitions:SyncWaterfallHook<[Record<string, CodeValue>], Record<string, CodeValue>>


Type:{ [index: string]: RecursiveArrayOrRecord<T> } | RecursiveArrayOrRecord<T>[] | T