Skip to content

Commit 1f34db9

Browse files
committed
fix: glob patterns error on windows (vuejs#348)
1 parent 21ff612 commit 1f34db9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/dev.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
2626
console.error(chalk.red(err.stack))
2727
})
2828
}
29-
29+
console.log(path.join(sourceDir, '**/*.md'))
30+
console.log(path.resolve(sourceDir, '**/*.md'))
3031
// watch add/remove of files
3132
const pagesWatcher = chokidar.watch([
32-
path.join(sourceDir, '**/*.md'),
33-
path.join(sourceDir, '.vuepress/components/**/*.vue')
33+
'**/*.md',
34+
'.vuepress/components/**/*.vue'
3435
], {
36+
cwd: sourceDir,
3537
ignored: '.vuepress/**/*.md',
3638
ignoreInitial: true
3739
})

0 commit comments

Comments
 (0)