mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
fix(v2): fix chokidar not watching files correctly (#1340)
This commit is contained in:
parent
aa27f82acc
commit
2248b4b927
4 changed files with 26 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue