|
diff --git a/node_modules/@remix-run/dev/compiler.js b/node_modules/@remix-run/dev/compiler.js |
|
index 902b251..9b6c54d 100644 |
|
--- a/node_modules/@remix-run/dev/compiler.js |
|
+++ b/node_modules/@remix-run/dev/compiler.js |
|
@@ -210,7 +210,10 @@ async function watch(config$1, { |
|
if (config$1.serverEntryPoint) { |
|
toWatch.push(config$1.serverEntryPoint); |
|
} |
|
- |
|
+ config$1.watchDirectories?.forEach((directory) => { |
|
+ toWatch.push(directory); |
|
+ }); |
|
+ console.log('watching directories:', toWatch); |
|
let watcher = chokidar__default["default"].watch(toWatch, { |
|
persistent: true, |
|
ignoreInitial: true, |
|
diff --git a/node_modules/@remix-run/dev/config.js b/node_modules/@remix-run/dev/config.js |
|
index 5aede25..074b351 100644 |
|
--- a/node_modules/@remix-run/dev/config.js |
|
+++ b/node_modules/@remix-run/dev/config.js |
|
@@ -182,6 +182,11 @@ async function readConfig(remixRoot, serverMode = serverModes.ServerMode.Product |
|
}; |
|
} |
|
} |
|
+ let watchDirectories = []; |
|
+ if (appConfig.watchDirectories) { |
|
+ let directories = await appConfig.watchDirectories(); |
|
+ watchDirectories = watchDirectories.concat(Array.isArray(directories) ? directories : [directories]); |
|
+ } |
|
|
|
let serverBuildTargetEntryModule = `export * from ${JSON.stringify(virtualModules.serverBuildVirtualModule.id)};`; |
|
let serverDependenciesToBundle = appConfig.serverDependenciesToBundle || []; |
|
@@ -204,7 +209,8 @@ async function readConfig(remixRoot, serverMode = serverModes.ServerMode.Product |
|
serverBuildTargetEntryModule, |
|
serverEntryPoint: customServerEntryPoint, |
|
serverDependenciesToBundle, |
|
- mdx |
|
+ mdx, |
|
+ watchDirectories, |
|
}; |
|
} |
|
|