Skip to content

Commit 6048eb9

Browse files
committed
fix($dev): using config.yml/toml doesn't reload changes (close: #520)
1 parent c228de9 commit 6048eb9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/dev.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,13 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
4444

4545
// watch config file
4646
const configWatcher = chokidar.watch([
47-
path.join(sourceDir, '.vuepress/config.js')
48-
], { ignoreInitial: true })
47+
'.vuepress/config.js',
48+
'.vuepress/config.yml',
49+
'.vuepress/config.toml'
50+
], {
51+
cwd: sourceDir,
52+
ignoreInitial: true
53+
})
4954
configWatcher.on('change', update)
5055

5156
// also listen for frontmatter changes from markdown files

0 commit comments

Comments
 (0)