From 491aa2cec20221a775a3a73392e0f094aaee4193 Mon Sep 17 00:00:00 2001 From: imal1 Date: Thu, 19 Sep 2024 18:35:26 +0800 Subject: [PATCH] replace hooks --- src/core/unplugin.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/unplugin.ts b/src/core/unplugin.ts index 6e8b31c..d92755a 100644 --- a/src/core/unplugin.ts +++ b/src/core/unplugin.ts @@ -114,13 +114,13 @@ export default createUnplugin((options, meta) => { }, }, webpack(compiler) { - compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { - frameConfig = compilation.options + compiler.hooks.watchRun.tap(PLUGIN_NAME, (watching) => { + frameConfig = watching.options }) }, rspack(compiler) { - compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { - frameConfig = compilation.options + compiler.hooks.watchRun.tap(PLUGIN_NAME, (watching) => { + frameConfig = watching.options }) }, }