mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-30 05:52:50 +00:00
fix(v2): enable plugin not having pathsToWatch (#1305)
This commit is contained in:
parent
72242dddf4
commit
290ccc5315
|
|
@ -47,8 +47,12 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
};
|
||||
const {plugins} = props;
|
||||
const docsRelativeDir = props.siteConfig.customDocsPath;
|
||||
const pluginPaths = _.flatten(
|
||||
plugins.map(plugin => plugin.getPathsToWatch()),
|
||||
const pluginPaths = _.compact(
|
||||
_.flatten(
|
||||
plugins.map(
|
||||
plugin => plugin.getPathsToWatch && plugin.getPathsToWatch(),
|
||||
),
|
||||
),
|
||||
);
|
||||
const fsWatcher = chokidar.watch(
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in New Issue