Skip to content

Commit

Permalink
Exclude uploads folder from live reload patterns (#5702)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenDE authored Jan 24, 2024
1 parent c841f2e commit 96387d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion installer/templates/phx_single/config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config :<%= @app_name %>, <%= @endpoint_module %>,
config :<%= @app_name %>, <%= @endpoint_module %>,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",<%= if @gettext do %>
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",<%= if @gettext do %>
~r"priv/gettext/.*(po)$",<% end %>
~r"lib/<%= @lib_web_name %>/(controllers|live|components)/.*(ex|heex)$"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config :<%= @web_app_name %>, <%= @endpoint_module %>,
config :<%= @web_app_name %>, <%= @endpoint_module %>,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",<%= if @gettext do %>
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",<%= if @gettext do %>
~r"priv/gettext/.*(po)$",<% end %>
~r"lib/<%= @web_app_name %>/(controllers|live|components)/.*(ex|heex)$"
]
Expand Down
2 changes: 1 addition & 1 deletion lib/phoenix/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ defmodule Phoenix.Endpoint do
live_reload: [
url: "ws://localhost:4000",
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
~r"lib/app_web/(live|views)/.*(ex)$",
~r"lib/app_web/templates/.*(eex)$"
]
Expand Down

0 comments on commit 96387d2

Please sign in to comment.