From 0aa2799a1f214714657a26c67e9a42c416cd6f62 Mon Sep 17 00:00:00 2001 From: markthree <1801982702@qq.com> Date: Tue, 16 May 2023 15:02:49 +0800 Subject: [PATCH] fix: slash dir glob to support windows match --- src/core/unplugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/unplugin.ts b/src/core/unplugin.ts index a5b142be..8c8f1607 100644 --- a/src/core/unplugin.ts +++ b/src/core/unplugin.ts @@ -25,7 +25,7 @@ export default createUnplugin((options) => { }, vite: { async handleHotUpdate({ file }) { - if (ctx.dirs?.some(glob => minimatch(slash(file), glob))) + if (ctx.dirs?.some(glob => minimatch(slash(file), slash(glob)))) await ctx.scanDirs() }, async configResolved(config) {