mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 12:37:58 +01:00
13 lines
430 B
Elixir
13 lines
430 B
Elixir
|
defmodule PhilomenaWeb.Config do
|
||
|
@reload_enabled Application.compile_env(:philomena, :vite_reload, false)
|
||
|
@csp_relaxed Application.compile_env(:philomena, :csp_relaxed, false)
|
||
|
|
||
|
defmacro vite_hmr?(do: do_clause, else: else_clause) do
|
||
|
if(@reload_enabled, do: do_clause, else: else_clause)
|
||
|
end
|
||
|
|
||
|
defmacro csp_relaxed?(do: do_clause, else: else_clause) do
|
||
|
if(@csp_relaxed, do: do_clause, else: else_clause)
|
||
|
end
|
||
|
end
|