Skip to content

Commit f39fac9

Browse files
sean2121antfu
andauthored
fix: use tapPromise instead of tapAsync for webpack watchRun hook (#907)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
1 parent 6165baa commit f39fac9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/unplugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default createUnplugin<Options>((options = {}) => {
8484
webpack(compiler) {
8585
let watcher: Watching
8686
let fileDepQueue: { path: string, type: 'unlink' | 'add' }[] = []
87-
compiler.hooks.watchRun.tapAsync(PLUGIN_NAME, async () => {
87+
compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, async () => {
8888
// ensure watcher is ready(supported since webpack@5.0.0-rc.1)
8989
if (!watcher && compiler.watching) {
9090
watcher = compiler.watching

0 commit comments

Comments
 (0)