On this page

new Compiler(context, options?): Compiler
Attributes
context:<string>
the compilation path
Returns:<Compiler>
close(callback): void
Attributes
callback:<object>
signals when the compiler closes
Returns:
{void}

compile(callback): void
  • callback {CallbackWebpackFunction_2< Compilation, void >} signals when the compilation finishes
  • Returns: {void}

createChildCompiler(compilation, compilerName, compilerIndex, outputOptions?, plugins?): Compiler
Attributes
compilation:<Compilation>
the compilation
compilerName:<string>
the compiler's name
compilerIndex:<number>
the compiler's index
outputOptions:
{Partial< OutputNormalized >} the output options
the plugins to apply
Returns:<Compiler>
a child compiler

createCompilation(params): void
  • params {CompilationParams} the compilation parameters
  • Returns: <Compilation> compilation

createContextModuleFactory(): ContextModuleFactory

createNormalModuleFactory(): NormalModuleFactory

emitAssets(compilation, callback): void
Attributes
compilation:<Compilation>
the compilation
callback:<object>
signals when the assets are emitted
Returns:
{void}

emitRecords(callback): void
Attributes
callback:<object>
signals when the call finishes
Returns:
{void}

getCache(name): CacheFacade
Attributes
cache name
the cache facade instance

getInfrastructureLogger(name): WebpackLogger
Attributes
name of the logger, or function called once to get the logger name
Returns:
{WebpackLogger} a logger with that name

isChild(): boolean
Returns:<boolean>

Compilation(params): void
  • params {CompilationParams} the compilation parameters
  • Returns: <Compilation> the created compilation

CompilationParams(): object
Returns:<object>

purgeInputFileSystem(): void
Returns:
{void}

readRecords(callback): void
Attributes
callback:<object>
signals when the call finishes
Returns:
{void}

run(callback): void
  • callback {CallbackWebpackFunction_2< Stats, void >} signals when the call finishes
  • Returns: {void}

runAsChild(callback): void
Attributes
callback:<object>
signals when the call finishes
Returns:
{void}

validate(schema, value, options?, check?): void
Attributes
schema:<object>
schema
value:
{T} value
options:
{ValidationErrorConfiguration} options
check:<object>
options
Returns:
{void}

Schema validation function with optional pre-compiled check


watch(watchOptions, handler): Watching | undefined
Attributes
watchOptions:<WatchOptions>
the watcher's options
handler:
{CallbackWebpackFunction_2< Stats, void >} signals when the call finishes
a compiler watcher