1 parent c943313 commit 1fa59e4Copy full SHA for 1fa59e4
1 file changed
packages/apostrophe/modules/@apostrophecms/template/lib/viewWatcher.js
@@ -41,6 +41,11 @@ module.exports = (self) => {
41
if (self.options.loader && self.options.loader.noWatch) {
42
return;
43
}
44
+ // In production the file tree is static and watching only burns
45
+ // file descriptors. Honor NODE_ENV unconditionally.
46
+ if (process.env.NODE_ENV === 'production') {
47
+ return;
48
+ }
49
// chokidar's recursive watching is not reliable on WSL; preserve the
50
// historical behavior of skipping watch setup entirely there.
51
if (isWsl) {
0 commit comments