fix(v2): fix chokidar not watching files correctly (#1340)

This commit is contained in:
Endilie Yacop Sucipto 2019-04-07 01:52:49 +07:00 committed by Yangshun Tay
parent aa27f82acc
commit 2248b4b927
4 changed files with 26 additions and 5 deletions

View file

@ -41,7 +41,11 @@ class DocusaurusPluginContentDocs {
}
getPathsToWatch() {
return [this.contentPath, this.options.sidebarPath];
const {include = []} = this.options;
const globPattern = include.map(
pattern => `${this.contentPath}/${pattern}`,
);
return [...globPattern, this.options.sidebarPath];
}
// Fetches blog contents and returns metadata for the contents.