On this page

new Compiler(context, options?): Compiler
Attributes
context:<string>
the compilation path
Returns:<Compiler>

Creates an instance of Compiler.

Attributes
cache:<Cache>
compilerPath:<string>
context:<string>
fsStartTime:<number>
hooks:
{Readonly<{ additionalPass: AsyncSeriesHook<[]>; afterCompile: AsyncSeriesHook<[Compilation]>; afterDone: SyncHook<[Stats]>; afterEmit: AsyncSeriesHook<[Compilation]>; afterEnvironment: SyncHook<[]>; afterPlugins: SyncHook<[Compiler]>; afterResolvers: SyncHook<[Compiler]>; assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>; beforeCompile: AsyncSeriesHook<[CompilationParams]>; beforeRun: AsyncSeriesHook<[Compiler]>; compilation: SyncHook<[Compilation, CompilationParams]>; compile: SyncHook<[CompilationParams]>; contextModuleFactory: SyncHook<[ContextModuleFactory]>; done: AsyncSeriesHook<[Stats]>; emit: AsyncSeriesHook<[Compilation]>; emitRecords: AsyncSeriesHook<[]>; entryOption: SyncBailHook<[string, EntryNormalized], boolean | void>; environment: SyncHook<[]>; failed: SyncHook<[Error]>; finishMake: AsyncParallelHook<[Compilation]>; infrastructureLog: SyncBailHook<[string, string, undefined | any[]], true | void>; initialize: SyncHook<[]>; invalid: SyncHook<[null | string, number]>; make: AsyncParallelHook<[Compilation]>; normalModuleFactory: SyncHook<[NormalModuleFactory]>; readRecords: AsyncSeriesHook<[]>; run: AsyncSeriesHook<[Compiler]>; shouldEmit: SyncBailHook<[Compilation], boolean | void>; shutdown: AsyncSeriesHook<[]>; thisCompilation: SyncHook<[Compilation, CompilationParams]>; validate: SyncHook<[]>; watchClose: SyncHook<[]>; watchRun: AsyncSeriesHook<[Compiler]> }>}
immutablePaths:<Set>
infrastructureLogger:
(value: <string> , type: <LogTypeEnum> , args?: <any> []) => <void>
inputFileSystem:<InputFileSystem> | <null>
intermediateFileSystem:<IntermediateFileSystem> | <null>
managedPaths:<Set>
modifiedFiles:
{ReadonlySet }
moduleMemCaches:<Map>
outputFileSystem:<OutputFileSystem> | <null>
outputPath:<string>
parentCompilation:<Compilation>
platform:
{Readonly }
records:<Records>
recordsInputPath:<string> | <null>
recordsOutputPath:<string> | <null>
removedFiles:
{ReadonlySet }
requestShortener:<RequestShortener>
resolverFactory:<ResolverFactory>
running:<boolean>
unmanagedPaths:<Set>
watchFileSystem:<WatchFileSystem> | <null>
watching:<Watching>
watchMode:<boolean>
webpack:
{typeof export=}
close(callback): void

Processes the provided error callback.


compile(callback): void
Attributes
< <Compilation> , <void> > signals when the compilation finishes
Returns:<void>

Processes the provided compilation.


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 } the output options
plugins:
{(false | "" | 0 | WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void) | null | undefined)[]} the plugins to apply
Returns:<Compiler>
a child compiler

Creates a child compiler.


createCompilation(params): Compilation
Attributes
the compilation parameters
compilation

Creates a compilation.


createContextModuleFactory(): ContextModuleFactory

createNormalModuleFactory(): NormalModuleFactory

emitAssets(compilation, callback): void
Attributes
compilation:<Compilation>
the compilation
callback:
(err: <Error> | <null> , result?: <void> ) => <void> signals when the assets are emitted
Returns:<void>

Processes the provided compilation.


emitRecords(callback): void

Processes the provided error callback.


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

Returns the cache facade instance.


getInfrastructureLogger(name): WebpackLogger
Attributes
| () => <string> name of the logger, or function called once to get the logger name
a logger with that name

Gets infrastructure logger.


isChild(): boolean
Returns:<boolean>

Compilation(params): Compilation
Attributes
the compilation parameters
the created compilation

Returns the created compilation.


CompilationParams(): { contextModuleFactory: ContextModuleFactory; normalModuleFactory: NormalModuleFactory
Returns:
{{ contextModuleFactory: ContextModuleFactory; normalModuleFactory: NormalModuleFactory }}

purgeInputFileSystem(): void
Returns:<void>

readRecords(callback): void

Processes the provided error callback.


run(callback): void
Attributes
< <Stats> , <void> > signals when the call finishes
Returns:<void>

Processes the provided stat.


runAsChild(callback): void

Processes the provided run as child callback.


validate(schema, value, options?, check?): void
  • schema <JSONSchema4> & <ExtendedSchema> | <JSONSchema6> & <ExtendedSchema> | <JSONSchema7> & <ExtendedSchema> | () => <Schema> schema
  • value {T} value
  • options {ValidationErrorConfiguration} options
  • check (value: <T>) => <boolean> options
  • Returns: <void>

Schema validation function with optional pre-compiled check


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

Returns a compiler watcher.

Checks whether this object is sorted.

Attributes
compilation:<Compilation>
content:
{Buffer}
outputPath:<string>
source:<Source>
targetPath:<string>

Type:
<"error"> | <"warn"> | <"info"> | <"log"> | <"debug"> | <"clear"> | <"profile"> | <"trace"> | <"group"> | <"groupCollapsed"> | <"groupEnd"> | <"profileEnd"> | <"time"> | <"status">

Attributes
buildInfo:<BuildInfo>
< <any> [], <any> >