diff --git a/middleman-core/lib/middleman-core/preview_server.rb b/middleman-core/lib/middleman-core/preview_server.rb index 93934478..ce127b5f 100644 --- a/middleman-core/lib/middleman-core/preview_server.rb +++ b/middleman-core/lib/middleman-core/preview_server.rb @@ -163,14 +163,16 @@ module Middleman path: root, only: match_against - # Hack around node_modules in root. - watcher.listener.ignore(/^node_modules/) + unless config[:watcher_disable] + # Hack around node_modules in root. + watcher.listener.ignore(/^node_modules/) - # Hack around sass cache in root. - watcher.listener.ignore(/^\.sass-cache/) + # Hack around sass cache in root. + watcher.listener.ignore(/^\.sass-cache/) - # Hack around bundler cache in root. - watcher.listener.ignore(/^vendor\/bundle/) + # Hack around bundler cache in root. + watcher.listener.ignore(/^vendor\/bundle/) + end end end