Browse Source

Maintenance: Add env variable to change file watcher for developments.

Rolf Schmidt 2 years ago
parent
commit
c26d5f1ddc
1 changed files with 5 additions and 1 deletions
  1. 5 1
      config/environments/development.rb

+ 5 - 1
config/environments/development.rb

@@ -57,7 +57,11 @@ Rails.application.configure do
 
   # Use an evented file watcher to asynchronously detect changes in source code,
   # routes, locales, etc. This feature depends on the listen gem.
-  config.file_watcher = ActiveSupport::EventedFileUpdateChecker
+  config.file_watcher = if ENV['DEVELOPMENT_FILE_WATCHER'] == 'file_update_checker'
+                          ActiveSupport::FileUpdateChecker
+                        else
+                          ActiveSupport::EventedFileUpdateChecker
+                        end
 
   # Asset digests allow you to set far-future HTTP expiration dates on all assets,
   # yet still be able to expire them through the digest params.