new Compiler(context, options?): CompilerAttributes
Creates an instance of Compiler.
Attributes
cache:
CachecompilerPath:
stringcontext:
stringcontextTimestamps:
Map<string, "ignore" | EntryTypesIndex | OnlySafeTimeEntry | ExistenceOnlyTimeEntryTypesIndex | null>fileTimestamps:
Map<string, "ignore" | EntryTypesIndex | OnlySafeTimeEntry | ExistenceOnlyTimeEntryTypesIndex | null>fsStartTime:
numberhooks:
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:
booleaninfrastructureLogger:
(value: string, type: LogTypeEnum, args?: any[]) => voidinputFileSystem:
InputFileSystem | nullintermediateFileSystem:
IntermediateFileSystem | nullmodifiedFiles:
ReadonlySet<string>moduleMemCaches:
Map<Module, ModuleMemCachesItem>name:
stringoptions:
WebpackOptionsNormalizedoutputFileSystem:
OutputFileSystem | nulloutputPath:
stringparentCompilation:
Compilationplatform:
Readonly<PlatformTargetProperties>records:
RecordsrecordsInputPath:
string | nullrecordsOutputPath:
string | nullremovedFiles:
ReadonlySet<string>requestShortener:
RequestShortenerresolverFactory:
ResolverFactoryroot:
Compilerrunning:
booleanwatchFileSystem:
WatchFileSystem | nullwatching:
WatchingwatchMode:
booleanwebpack:
typeof export=close(callback): voidAttributes
Processes the provided error callback.
compile(callback): voidAttributes
callback:
CallbackWebpackFunction_2<Compilation, void>signals when the compilation finishes
Returns:
voidProcesses the provided compilation.
createChildCompiler(compilation, compilerName, compilerIndex, outputOptions?, plugins?): CompilerAttributes
compilation:
Compilationthe compilation
compilerName:
stringthe compiler's name
compilerIndex:
numberthe compiler's index
outputOptions:
Partial<OutputNormalized>the output options
plugins:
(false | "" | 0 | WebpackPluginInstance | ((this: Compiler, compiler: Compiler) => void) | null | undefined)[]the plugins to apply
Returns:
Compilera child compiler
Creates a child compiler.
createCompilation(params): CompilationAttributes
params:
CompilationParamsthe compilation parameters
Returns:
Compilationcompilation
Creates a compilation.
createContextModuleFactory(): ContextModuleFactoryReturns:
ContextModuleFactorycreateNormalModuleFactory(): NormalModuleFactoryReturns:
NormalModuleFactoryemitAssets(compilation, callback): voidAttributes
compilation:
Compilationthe compilation
Returns:
voidProcesses the provided compilation.
emitRecords(callback): voidAttributes
Processes the provided error callback.
getCache(name): CacheFacadeAttributes
name:
stringcache name
Returns:
CacheFacadethe cache facade instance
Returns the cache facade instance.
getInfrastructureLogger(name): WebpackLoggerAttributes
Returns:
WebpackLoggera logger with that name
Gets infrastructure logger.
isChild(): booleanReturns:
booleanCompilation(params): CompilationAttributes
params:
CompilationParamsthe compilation parameters
Returns:
Compilationthe created compilation
Returns the created compilation.
CompilationParams(): { contextModuleFactory: ContextModuleFactory; normalModuleFactory: NormalModuleFactory }Returns:
{ contextModuleFactory: ContextModuleFactory; normalModuleFactory: NormalModuleFactory }purgeInputFileSystem(): voidReturns:
voidreadRecords(callback): voidAttributes
Processes the provided error callback.
M
run
run(callback): voidAttributes
callback:
CallbackWebpackFunction_2<Stats, void>signals when the call finishes
Returns:
voidProcesses the provided stat.
runAsChild(callback): voidAttributes
callback:
(err: Error | null, entries?: Chunk[], compilation?: Compilation) => voidsignals when the call finishes
Returns:
voidProcesses the provided run as child callback.
validate(schema, value, options?, check?): voidAttributes
Schema validation function with optional pre-compiled check
watch(watchOptions, handler): Watching | undefinedAttributes
watchOptions:
WatchOptionsthe watcher's options
handler:
CallbackWebpackFunction_2<Stats, void>signals when the call finishes
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