environment
Called while preparing the compiler environment, right after initializing the plugins in the configuration file.
SyncHook<[]>
afterEnvironment
Called right after the environment
hook, when the compiler environment setup is complete.
SyncHook<[]>
entryOption
Called after the entry
configuration from Rspack options has been processed.
SyncBailHook<[string, EntryNormalized]>
afterPlugins
Called after setting up initial set of internal plugins.
SyncHook<[Compiler]>
Compiler
: current compiler instanceafterResolvers
Triggered after resolver setup is complete.
SyncHook<[Compiler]>
Compiler
: current compiler instanceinitialize
Called when a compiler object is initialized.
SyncHook<[]>
beforeRun
Adds a hook right before running the compiler.
AsyncSeriesHook<[Compiler]>
Compiler
: current compiler instancerun
Called ad the beginning of a build execution.
AsyncSeriesHook<[Compiler]>
Compiler
: current compiler instancewatchRun
Executes a plugin during watch mode after a new compilation is triggered but before the compilation is actually started.
AsyncSeriesHook<[Compiler]>
Compiler
: current compiler instancebeforeCompile
Executes a plugin after compilation parameters are created.
AsyncSeriesHook<[]>
compile
Called right after beforeCompile
, before a new compilation is created.
SyncHook<[]>
thisCompilation
Called while initializing the compilation, right before calling the compilation
hook.
SyncHook<[Compilation]>
Compilation
: created compilation objectcompilation
Runs a plugin after a compilation has been created.
SyncHook<[Compilation]>
Compilation
: created compilation objectmake
Called before the make phase.
In the make phase, Rspack will build the module graph starting from the entry, and use the loader to handle each module.
AsyncParallelHook<[Compilation]>
Compilation
: current compilation objectafterCompile
Called after the make phase and before the seal phase.
In the seal phase, Rspack will create chunk graph from the module graph and then generate the assets.
AsyncSeriesHook<[Compilation]>
Compilation
: current compilation objectshouldEmit
Called before emitting assets. Should return a boolean telling whether to emit.
SyncBailHook<[Compilation]>
Compilation
: current compilation objectemit
Called right before emitting assets to output dir.
AsyncSeriesHook<[Compilation]>
Compilation
: current compilation objectafterEmit
Called after emitting assets to output directory.
AsyncSeriesHook<[Compilation]>
Compilation
: current compilation objectdone
Called when the compilation has completed.
AsyncSeriesHook<Stats>
Stats
: generated stats objectafterDone
Called after done
hook.
SyncHook<Stats>
Stats
: generated stats objectfailed
Called if the compilation fails.
SyncHook<[Error]>
watchClose
Called when a watching compilation has stopped.
SyncHook<[]>
shutdown
Called when the compiler is closing.
AsyncSeriesHook<[]>