Skip to content

Commit

Permalink
Make it clear it's only possible to watch dirs inside the project root (
Browse files Browse the repository at this point in the history
  • Loading branch information
carlotm authored Aug 17, 2022
1 parent 1e52ce6 commit 6642101
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ config :phoenix_live_reload,
backend: :fs_poll
```

By default the entire application directory is watched by the backend. However, with some environments and backends, this may be inefficient, resulting in slow response times to file modifications. To account for this, it's also possible to explicitly declare a list of directories for the backend to watch, and additional options for the backend:
By default the entire application directory is watched by the backend. However, with some environments and backends, this may be inefficient, resulting in slow response times to file modifications. To account for this, it's also possible to explicitly declare a list of directories for the backend to watch (they must be relative to the project root, otherwise they are just ignored), and additional options for the backend:

```elixir
config :phoenix_live_reload,
Expand All @@ -49,6 +49,8 @@ config :phoenix_live_reload,
"lib/example_web/live",
"lib/example_web/views",
"lib/example_web/templates",
"../another_project/priv/static", # Contents of this directory is not watched
"/another_project/priv/static", # Contents of this directory is not watched
],
backend: :fs_poll,
backend_opts: [
Expand Down

0 comments on commit 6642101

Please sign in to comment.