feat(v2): live reload sidebars.json (#1058)

This commit is contained in:
Endilie Yacop Sucipto 2018-10-23 19:31:30 +08:00 committed by Yangshun Tay
parent d8e5f315f1
commit 3e901f8706
2 changed files with 10 additions and 2 deletions

View file

@ -40,7 +40,12 @@ module.exports = async function start(siteDir, cliOptions = {}) {
};
const docsRelativeDir = props.siteConfig.customDocsPath;
const fsWatcher = chokidar.watch(
[`../${docsRelativeDir}/**/*.md`, 'blog/**/*.md', 'siteConfig.js'],
[
`../${docsRelativeDir}/**/*.md`,
'blog/**/*.md',
'siteConfig.js',
'sidebars.json',
],
{
cwd: siteDir,
ignoreInitial: true,