diff --git a/lib/dev.js b/lib/dev.js index dbc7c1c187..cfb7dc4bf7 100644 --- a/lib/dev.js +++ b/lib/dev.js @@ -44,8 +44,13 @@ module.exports = async function dev (sourceDir, cliOptions = {}) { // watch config file const configWatcher = chokidar.watch([ - path.join(sourceDir, '.vuepress/config.js') - ], { ignoreInitial: true }) + '.vuepress/config.js', + '.vuepress/config.yml', + '.vuepress/config.toml' + ], { + cwd: sourceDir, + ignoreInitial: true + }) configWatcher.on('change', update) // also listen for frontmatter changes from markdown files