From 00efe9dc765b995d3cd58b1cd98e569e6479b3b8 Mon Sep 17 00:00:00 2001 From: Robot-Inventor <30.keita@gmail.com> Date: Thu, 7 Nov 2024 23:25:01 +0900 Subject: [PATCH] chore: migrate from glob to `ignored` option due to chokidar v4 glob support removal --- webpack.config.cjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.config.cjs b/webpack.config.cjs index 0dce48e..e24fb0e 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -20,7 +20,9 @@ class RunCommandsPlugin { compiler.hooks.watchRun.tapAsync("RunCommandsPlugin", (params, callback) => { isWatchMode = true; if (!manifestWatcher) { - manifestWatcher = chokidar.watch("src/manifest/**/*.json"); + manifestWatcher = chokidar.watch("src/manifest/", { + ignored: (pathString, stats) => Boolean(stats && stats.isFile() && !pathString.endsWith(".json")) + }); manifestWatcher.on("change", (path) => { console.log(`Manifest file changed: ${path}`); this.copyManifest();