diff --git a/src/rspack/index.ts b/src/rspack/index.ts index 5abbb771..b4ffaec0 100644 --- a/src/rspack/index.ts +++ b/src/rspack/index.ts @@ -62,6 +62,14 @@ export function getRspackPlugin( if (plugin.rspack) plugin.rspack(compiler) + if (plugin.buildStart) { + compiler.hooks.make.tapPromise(plugin.name, async (compilation) => { + const context = createRspackContext(compilation) + if (plugin.buildStart) + return await plugin.buildStart.call(context) + }) + } + if (plugin.buildEnd) { compiler.hooks.emit.tapPromise(plugin.name, async (compilation) => { await plugin.buildEnd!.call(createRspackContext(compilation))