From 7e9d0c1f42196dee52daabfaf796e0cdaa7bd6eb Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Tue, 9 Jun 2020 16:48:59 +0100 Subject: [PATCH] fix (#2392): hmr issue and watch for chokidar v3 (#2436) * fix: watch for chokidar v3 * chore: remove comments --- packages/@vuepress/core/lib/node/dev/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/@vuepress/core/lib/node/dev/index.js b/packages/@vuepress/core/lib/node/dev/index.js index bec9a1de..224de170 100644 --- a/packages/@vuepress/core/lib/node/dev/index.js +++ b/packages/@vuepress/core/lib/node/dev/index.js @@ -207,8 +207,12 @@ module.exports = class DevProcess extends EventEmitter { publicPath: this.context.base, watchOptions: { ignored: [ - /node_modules/, - `!${this.context.tempPath}/**` + (x) => { + if (x.includes(this.context.tempPath)) { + return false + } + return /node_modules/.test(x) + } ] }, historyApiFallback: { -- GitLab