Compilation module is created by the Compiler and represents a single build of the assets. In watch mode, a new compilation is created each time a file changes.
Accessing Compilation Hooks
Access compilation hooks through the compiler’scompilation hook:
Module Hooks
buildModule
rebuildModule
succeedModule
failedModule
stillValidModule
finishModules
finishRebuildingModule
Entry Hooks
addEntry
succeedEntry
failedEntry
Sealing Hooks
seal
unseal
afterSeal
Chunk Hooks
beforeChunks
afterChunks
Optimization Hooks
optimize
optimizeModules
true to skip remaining optimizations.
afterOptimizeModules
optimizeChunks
afterOptimizeChunks
optimizeTree
optimizeChunkModules
Module & Chunk IDs
moduleIds
chunkIds
Hash Hooks
beforeHash
afterHash
fullHash
chunkHash
contentHash
Asset Hooks
beforeModuleAssets
beforeChunkAssets
processAssets
afterProcessAssets
moduleAsset
chunkAsset
Record Hooks
record
Stats Hooks
statsPreset
statsNormalize
statsFactory
statsPrinter
Runtime Requirements Hooks
additionalTreeRuntimeRequirements
Complete Example
See Also
- Compiler Hooks - Hooks for the compiler lifecycle
- Module Factories - Module creation hooks
- Parser Hooks - Code parsing hooks