Class: Compiler
Defined in: webpack/types.d.ts:2876Constructors
Constructor
new Compiler(Defined in: webpack/types.d.ts:2877context,options?):Compiler
Parameters
context
string
options?
WebpackOptionsNormalized
Returns
Compiler
Properties
cache
cache: Cache
Defined in: webpack/types.d.ts:2961
compilerPath
compilerPath: string
Defined in: webpack/types.d.ts:2963
context
context: string
Defined in: webpack/types.d.ts:2959
contextTimestamps?
Defined in: webpack/types.d.ts:2942optionalcontextTimestamps:Map<string,"ignore"|EntryTypesIndex|OnlySafeTimeEntry|ExistenceOnlyTimeEntryTypesIndex>
fileTimestamps?
Defined in: webpack/types.d.ts:2934optionalfileTimestamps:Map<string,"ignore"|EntryTypesIndex|OnlySafeTimeEntry|ExistenceOnlyTimeEntryTypesIndex>
fsStartTime?
Defined in: webpack/types.d.ts:2950optionalfsStartTime:number
hooks
hooks:Defined in: webpack/types.d.ts:2878Readonly<{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
idle: boolean
Defined in: webpack/types.d.ts:2965
immutablePaths
immutablePaths:Defined in: webpack/types.d.ts:2931Set<string|RegExp>
infrastructureLogger()?
Defined in: webpack/types.d.ts:2952optionalinfrastructureLogger: (value,type,args?) =>void
Parameters
value
string
type
LogTypeEnum
args?
any[]
Returns
void
inputFileSystem
inputFileSystem: InputFileSystem
Defined in: webpack/types.d.ts:2924
intermediateFileSystem
intermediateFileSystem: IntermediateFileSystem
Defined in: webpack/types.d.ts:2923
managedPaths
managedPaths:Defined in: webpack/types.d.ts:2929Set<string|RegExp>
modifiedFiles?
Defined in: webpack/types.d.ts:2932optionalmodifiedFiles:ReadonlySet<string>
moduleMemCaches?
Defined in: webpack/types.d.ts:2962optionalmoduleMemCaches:Map<Module,ModuleMemCachesItem>
name?
Defined in: webpack/types.d.ts:2917optionalname:string
options
options: WebpackOptionsNormalized
Defined in: webpack/types.d.ts:2958
outputFileSystem
outputFileSystem: OutputFileSystem
Defined in: webpack/types.d.ts:2922
outputPath
outputPath: string
Defined in: webpack/types.d.ts:2920
parentCompilation?
Defined in: webpack/types.d.ts:2918optionalparentCompilation:Compilation
platform
platform:Defined in: webpack/types.d.ts:2957Readonly<PlatformTargetProperties>
records
records: Records
Defined in: webpack/types.d.ts:2928
recordsInputPath
recordsInputPath: string
Defined in: webpack/types.d.ts:2926
recordsOutputPath
recordsOutputPath: string
Defined in: webpack/types.d.ts:2927
removedFiles?
Defined in: webpack/types.d.ts:2933optionalremovedFiles:ReadonlySet<string>
requestShortener
requestShortener: RequestShortener
Defined in: webpack/types.d.ts:2960
resolverFactory
resolverFactory: ResolverFactory
Defined in: webpack/types.d.ts:2951
root
root: Compiler
Defined in: webpack/types.d.ts:2919
running
running: boolean
Defined in: webpack/types.d.ts:2964
unmanagedPaths
unmanagedPaths:Defined in: webpack/types.d.ts:2930Set<string|RegExp>
watchFileSystem
watchFileSystem: WatchFileSystem
Defined in: webpack/types.d.ts:2925
watching?
Defined in: webpack/types.d.ts:2921optionalwatching:Watching
watchMode
watchMode: boolean
Defined in: webpack/types.d.ts:2966
webpack
webpack: typeof export=
Defined in: webpack/types.d.ts:2916
Methods
close()
close(Defined in: webpack/types.d.ts:3013callback):void
Parameters
callback
(err, result?) => void
Returns
void
compile()
compile(Defined in: webpack/types.d.ts:3012callback):void
Parameters
callback
CallbackWebpackFunction_2<Compilation, void>
Returns
void
createChildCompiler()
createChildCompiler(Defined in: webpack/types.d.ts:2988compilation,compilerName,compilerIndex,outputOptions?,plugins?):Compiler
Parameters
compilation
Compilation
compilerName
string
compilerIndex
number
outputOptions?
Partial<OutputNormalized>
plugins?
(false | "" | 0 | WebpackPluginInstance | (this, compiler) => void)[]
Returns
Compiler
createCompilation()
createCompilation(Defined in: webpack/types.d.ts:3004params):Compilation
Parameters
params
CompilationParams
Returns
Compilation
createContextModuleFactory()
createContextModuleFactory(): ContextModuleFactory
Defined in: webpack/types.d.ts:3007
Returns
ContextModuleFactory
createNormalModuleFactory()
createNormalModuleFactory(): NormalModuleFactory
Defined in: webpack/types.d.ts:3006
Returns
NormalModuleFactory
emitAssets()
emitAssets(Defined in: webpack/types.d.ts:2982compilation,callback):void
Parameters
compilation
Compilation
callback
(err, result?) => void
Returns
void
emitRecords()
emitRecords(Defined in: webpack/types.d.ts:2986callback):void
Parameters
callback
(err, result?) => void
Returns
void
getCache()
getCache(Defined in: webpack/types.d.ts:2967name):CacheFacade
Parameters
name
string
Returns
CacheFacade
getInfrastructureLogger()
getInfrastructureLogger(Defined in: webpack/types.d.ts:2968name):WebpackLogger
Parameters
name
string | () => string
Returns
WebpackLogger
isChild()
isChild(): boolean
Defined in: webpack/types.d.ts:3003
Returns
boolean
newCompilation()
newCompilation(Defined in: webpack/types.d.ts:3005params):Compilation
Parameters
params
CompilationParams
Returns
Compilation
newCompilationParams()
newCompilationParams(): object
Defined in: webpack/types.d.ts:3008
Returns
object
contextModuleFactory
contextModuleFactory: ContextModuleFactory
normalModuleFactory
normalModuleFactory: NormalModuleFactory
purgeInputFileSystem()
purgeInputFileSystem(): void
Defined in: webpack/types.d.ts:2981
Returns
void
readRecords()
readRecords(Defined in: webpack/types.d.ts:2987callback):void
Parameters
callback
(err, result?) => void
Returns
void
run()
run(Defined in: webpack/types.d.ts:2973callback):void
Parameters
callback
CallbackWebpackFunction_2<Stats, void>
Returns
void
runAsChild()
runAsChild(Defined in: webpack/types.d.ts:2974callback):void
Parameters
callback
(err, entries?, compilation?) => void
Returns
void
validate()
validate<Defined in: webpack/types.d.ts:3018 Schema validation function with optional pre-compiled checkT>(schema,value,options?,check?):void
Type Parameters
T
T extends object | object[] = object
Parameters
schema
JSONSchema4 & ExtendedSchema | JSONSchema6 & ExtendedSchema | JSONSchema7 & ExtendedSchema | () => Schema
value
T
options?
ValidationErrorConfiguration
check?
(value) => boolean
Returns
void
watch()
watch(Defined in: webpack/types.d.ts:2969watchOptions,handler):Watching
Parameters
watchOptions
WatchOptions
handler
CallbackWebpackFunction_2<Stats, void>
Returns
Watching