From ab53998c01d46cb7c110d9b76dc970a16a334a7e Mon Sep 17 00:00:00 2001 From: Liu Xinyu Date: Fri, 11 May 2018 10:43:48 -0500 Subject: [PATCH] fix: glob patterns error on windows (close: #348) (#400) --- lib/dev.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dev.js b/lib/dev.js index 6205cae828..79ed21a570 100644 --- a/lib/dev.js +++ b/lib/dev.js @@ -29,9 +29,10 @@ module.exports = async function dev (sourceDir, cliOptions = {}) { // watch add/remove of files const pagesWatcher = chokidar.watch([ - path.join(sourceDir, '**/*.md'), - path.join(sourceDir, '.vuepress/components/**/*.vue') + '**/*.md', + '.vuepress/components/**/*.vue' ], { + cwd: sourceDir, ignored: '.vuepress/**/*.md', ignoreInitial: true })