new Compiler(context, options?): CompilerAttributes
Creates an instance of Compiler.
Attributes
cache:
<Cache>compilerPath:
<string>context:
<string>contextTimestamps:
<Map><
<string>
,
<"ignore">
|
<EntryTypesIndex>
|
<OnlySafeTimeEntry>
|
<ExistenceOnlyTimeEntryTypesIndex>
|
<null>
>fileTimestamps:
<Map><
<string>
,
<"ignore">
|
<EntryTypesIndex>
|
<OnlySafeTimeEntry>
|
<ExistenceOnlyTimeEntryTypesIndex>
|
<null>
>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]> }>}
idle:
<boolean>infrastructureLogger:
inputFileSystem:
<InputFileSystem>
|
<null>intermediateFileSystem:
<IntermediateFileSystem>
|
<null>modifiedFiles:
{ReadonlySet
}
moduleMemCaches:
<Map>name:
<string>options:
<WebpackOptionsNormalized>outputFileSystem:
<OutputFileSystem>
|
<null>outputPath:
<string>parentCompilation:
<Compilation>platform:
{Readonly
}
records:
<Records>removedFiles:
{ReadonlySet
}
requestShortener:
<RequestShortener>resolverFactory:
<ResolverFactory>root:
<Compiler>running:
<boolean>watchFileSystem:
<WatchFileSystem>
|
<null>watching:
<Watching>watchMode:
<boolean>webpack:
{typeof export=}
close(callback): voidcallback(err:<Error>|<null>, result?:<void>) =><void>signals when the compiler closes- Returns:
<void>
Processes the provided error callback.
compile(callback): voidAttributes
callback:
<CallbackWebpackFunction_2><
<Compilation>
,
<void>
> signals when the compilation finishesReturns:
<void>Processes the provided compilation.
createChildCompiler(compilation, compilerName, compilerIndex, outputOptions?, plugins?): CompilerAttributes
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): CompilationAttributes
params:
<CompilationParams>the compilation parameters
Returns:
<Compilation>compilation
Creates a compilation.
createContextModuleFactory(): ContextModuleFactoryReturns:
<ContextModuleFactory>createNormalModuleFactory(): NormalModuleFactoryReturns:
<NormalModuleFactory>emitAssets(compilation, callback): voidAttributes
Processes the provided compilation.
emitRecords(callback): voidcallback(err:<Error>|<null>, result?:<void>) =><void>signals when the call finishes- Returns:
<void>
Processes the provided error callback.
getCache(name): CacheFacadeAttributes
name:
<string>cache name
Returns:
<CacheFacade>the cache facade instance
Returns the cache facade instance.
getInfrastructureLogger(name): WebpackLoggerAttributes
Returns:
<WebpackLogger>a logger with that name
Gets infrastructure logger.
isChild(): booleanReturns:
<boolean>Compilation(params): CompilationAttributes
params:
<CompilationParams>the compilation parameters
Returns:
<Compilation>the created compilation
Returns the created compilation.
CompilationParams(): { contextModuleFactory: ContextModuleFactory; normalModuleFactory: NormalModuleFactoryReturns:
{{ contextModuleFactory: ContextModuleFactory; normalModuleFactory: NormalModuleFactory }}
purgeInputFileSystem(): voidReturns:
<void>readRecords(callback): voidcallback(err:<Error>|<null>, result?:<void>) =><void>signals when the call finishes- Returns:
<void>
Processes the provided error callback.
M
run
run(callback): voidAttributes
callback:
<CallbackWebpackFunction_2>Returns:
<void>Processes the provided stat.
runAsChild(callback): voidcallback(err:<Error>|<null>, entries?:<Chunk>[], compilation?:<Compilation>) =><void>signals when the call finishes- Returns:
<void>
Processes the provided run as child callback.
validate(schema, value, options?, check?): voidschema<JSONSchema4>&<ExtendedSchema>|<JSONSchema6>&<ExtendedSchema>|<JSONSchema7>&<ExtendedSchema>| () =><Schema>schemavalue{T} valueoptions{ValidationErrorConfiguration} optionscheck(value:<T>) =><boolean>options- Returns:
<void>
Schema validation function with optional pre-compiled check
watch(watchOptions, handler): Watching | undefinedAttributes
watchOptions:
<WatchOptions>the watcher's options
handler:
<CallbackWebpackFunction_2>Returns:
<Watching>
|
<undefined>a compiler watcher
Returns a compiler watcher.
Checks whether this object is sorted.
Attributes
Type:
<"error">
|
<"warn">
|
<"info">
|
<"log">
|
<"debug">
|
<"clear">
|
<"profile">
|
<"trace">
|
<"group">
|
<"groupCollapsed">
|
<"groupEnd">
|
<"profileEnd">
|
<"time">
|
<"status">Attributes