Add dev config key to exclude specific files from triggering a reload by mkurz · Pull Request #13432 · playframework/playframework
Depends on
In dev mode, when a files gets changed, the dev server will be restarted.
This PR allows to set a config in build.sbt like:
PlayKeys.playMonitoredFilesExcludes += baseDirectory.value / "conf" / "somefile"
which makes the file conf/somefile be ignored from the reload mechanism. So a change to this file (or deletion or newly creation of this file) will not trigger a reload.
play-file-watch uses directory-watcher underneath which can only watch directories, not files, therefore we also can not just exclude a file easily - this is why I came up with this approach.