Skip to main content
webpack / DefinePlugin

Class: DefinePlugin

Defined in: webpack/types.d.ts:4069

Constructors

Constructor

new DefinePlugin(definitions): DefinePlugin
Defined in: webpack/types.d.ts:4073 Create a new define plugin

Parameters

definitions
Definitions

Returns

DefinePlugin

Properties

definitions

definitions: Definitions
Defined in: webpack/types.d.ts:4074

Methods

apply()

apply(compiler): void
Defined in: webpack/types.d.ts:4079 Apply the plugin

Parameters

compiler
Compiler

Returns

void

getCompilationHooks()

static getCompilationHooks(compilation): DefinePluginHooks
Defined in: webpack/types.d.ts:4080

Parameters

compilation
Compilation

Returns

DefinePluginHooks

runtimeValue()

static runtimeValue(fn, options?): RuntimeValue
Defined in: webpack/types.d.ts:4081

Parameters

fn
(value) => CodeValuePrimitive
options?
true | string[] | RuntimeValueOptions

Returns

RuntimeValue