webpack: Fix tools/webpack for webpack-cli 4 when inotify_broken.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-04-09 01:07:31 -07:00
parent 42b1f4e5f5
commit 4a7de53554
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,8 @@ def build_for_dev_server(host: str, port: str, minify: bool, disable_host_check:
if fields[1] == cwd: if fields[1] == cwd:
inotify_broken = fields[2] in ["nfs", "vboxsf", "prl_fs"] inotify_broken = fields[2] in ["nfs", "vboxsf", "prl_fs"]
if inotify_broken: if inotify_broken:
webpack_args.append("--watch-poll=1000") os.environ["CHOKIDAR_USEPOLLING"] = "1"
os.environ["CHOKIDAR_INTERVAL"] = "1000"
# TODO: This process should also fall back to periodic polling if # TODO: This process should also fall back to periodic polling if
# inotify_broken. # inotify_broken.