The content of this section is derived from the content of the following links and is subject to the CC BY 4.0 license.
The following contents can be assumed to be the result of modifications and deletions based on the original contents if not specifically stated.
Check out this page to see the status of Webpack Plugin API conformance.
environmentSyncHook<[]>
Called while preparing the compiler environment, right after initializing the plugins in the configuration file.
afterEnvironmentSyncHook<[]>
Called right after the environment hook, when the compiler environment setup is complete.
afterPluginsSyncHook<[Compiler]>
Called after setting up initial set of internal plugins.
afterResolversSyncHook<[Compiler]>
Triggered after resolver setup is complete.
entryOptionSyncBailHook<[string, EntryNormalized]>
Called after the entry configuration has been processed.
initializeSyncHook<[]>
Called when a compiler object is initialized.
beforeRunAsyncSeriesHook<[Compiler]>
Adds a hook right before running the compiler.
runAsyncSeriesHook<[Compiler]>
Called at the beginning of a build execution.
childCompilerSyncHook[Compiler, string, number]
where the version of the function type is
>=0.4.1.
Executed after created a childCompiler.
watchRunAsyncSeriesHook<[Compiler]>
Executes a plugin during watch mode after a new compilation is triggered but before the compilation is actually started.
compileSyncHook<[]>
Called right after beforeCompile, before a new compilation is created.
beforeCompileAsyncSeriesHook<[]>
Executes a plugin after compilation parameters are created.
afterCompileAsyncSeriesHook<[Compilation]>
Called after finishing and sealing the compilation.
thisCompilationSyncHook<[Compilation]>
Executed while initializing the compilation, right before emitting the compilation event.
compilationSyncHook<[Compilation]>
Runs a plugin after a compilation has been created.
makeAsyncParallelHook<[Compilation]>
Executed before the make stage.
shouldEmitSyncBailHook<[Compilation]>
where the version of the function type is
>=0.4.1.
Return a boolean telling whether to emit.
emitAsyncSeriesHook<[Compilation]>
Executed right before emitting assets to output directory.
afterEmitAsyncSeriesHook<[Compilation]>
Called after emitting assets to output directory.
doneAsyncSeriesHook<Stats>
Executed when the compilation has completed.
afterDoneAsyncSeriesHook<Stats>
Executed after done hook.
watchCloseSyncHook<[]>
Called when a watching compilation has stopped.
failedSyncHook<[Error]>
Called if the compilation fails.
buildModuleSyncHook<[JsModule]>
Triggered before a module build has started, can be used to modify the module (Rspack currently only support reading the module, modifying is not supported yet).
processAssetsAsyncSeriesHook<[CompilationAssets]>
Process the assets before emit.
optimizeModulesSyncBailHook<[JsModule[]]>
Called at the beginning of the module optimization phase. A plugin can tap into this hook to perform optimizations on modules.
optimizeChunkModuleAsyncSeriesBailHook<[JsModule[]]>
Called after the tree optimization, at the beginning of the chunk modules optimization. A plugin can tap into this hook to perform optimizations of chunk modules.
succeedModuleSyncHook<[JsModule]>
Executed when a module has been built successfully.
finishModulesAsyncSeriesHook<[JsModule[]]>
Called when all modules have been built without errors.
chunkAssetSyncHook<[JsChunk[], string /** filename*/ ]>
Triggered when an asset from a chunk was added to the compilation.
beforeResolveAsyncSeriesBailHook<[ResolveData]>
Called when a new dependency request is encountered. A dependency can be ignored by returning false. Otherwise, it should return undefined to proceed.
afterResolveAsyncSeriesBailHook<[ResolveData]>
Called after the request is resolved.
ResolveForSchemeAsyncSeriesBailHook<[ResourceDataWithData]>
Called before a request with scheme (URI) is resolved.
afterResolveAsyncSeriesBailHook<[ResolveData]>
Called after the requested directory resolved.