On this page

new Compiler(context, options?): Compiler
Attributes

Creates an instance of Compiler.

Attributes
compilerPath:<string>
context:<string>
fsStartTime:<number>
hooks:
<Readonly> < <object> >
immutablePaths:<Set>
infrastructureLogger:<Function>
inputFileSystem:<InputFileSystem> | <null>
intermediateFileSystem:<IntermediateFileSystem> | <null>
managedPaths:<Set>
modifiedFiles:
<ReadonlySet> < <string> >
moduleMemCaches:<Map>
outputFileSystem:<OutputFileSystem> | <null>
outputPath:<string>
parentCompilation:<Compilation>
platform:
records:<Records>
recordsInputPath:<string> | <null>
recordsOutputPath:<string> | <null>
removedFiles:
<ReadonlySet> < <string> >
requestShortener:<RequestShortener>
resolverFactory:<ResolverFactory>
running:<boolean>
unmanagedPaths:<Set>
watchFileSystem:<WatchFileSystem> | <null>
watching:<Watching>
watchMode:<boolean>
webpack:
{typeof exports}
close(callback): void
Attributes
callback:<Function>
Returns:<void>

Processes the provided error callback.


compile(callback): void
Attributes

Processes the provided compilation.


createChildCompiler(compilation, compilerName, compilerIndex, outputOptions?, plugins?): Compiler
Attributes
compilation:<Compilation>
compilerName:<string>
compilerIndex:<number>
outputOptions:
<Partial> < <OutputNormalized> >
plugins:
<false> | <""> | <0> | <WebpackPluginInstance> | <Function> | <null> | <undefined> []
Returns:<Compiler>

Creates a child compiler.


createCompilation(params): Compilation
Attributes

Creates a compilation.


createContextModuleFactory(): ContextModuleFactory

createNormalModuleFactory(): NormalModuleFactory

emitAssets(compilation, callback): void
Attributes
compilation:<Compilation>
callback:<Function>
Returns:<void>

Processes the provided compilation.


emitRecords(callback): void
Attributes
callback:<Function>
Returns:<void>

Processes the provided error callback.


getCache(name): CacheFacade
Attributes

Returns the cache facade instance.


getInfrastructureLogger(name): WebpackLogger
Attributes

Gets infrastructure logger.


isChild(): boolean
Returns:<boolean>

Compilation(params): Compilation
Attributes

Returns the created compilation.


CompilationParams(): object
Returns:<object>

purgeInputFileSystem(): void
Returns:<void>

readRecords(callback): void
Attributes
callback:<Function>
Returns:<void>

Processes the provided error callback.


run(callback): void
Attributes

Processes the provided stat.


runAsChild(callback): void
Attributes
callback:<Function>
Returns:<void>

Processes the provided run as child callback.


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

Schema validation function with optional pre-compiled check


watch(watchOptions, handler): Watching | undefined
Attributes

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> >