Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule SEO.MixProject do
elixir: ">= 1.17.0",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers() ++ [:seo_jsonld],
compilers: compilers(Mix.env()),
aliases: aliases(),
deps: deps(),
docs: docs(),
Expand All @@ -31,6 +31,14 @@ defmodule SEO.MixProject do
[preferred_envs: [tests: :test]]
end

# `:seo_jsonld` materializes the SEO.JSONLD.* modules for THIS library's own
# ExDoc site (:dev) and tests (:test). Dependencies always compile in :prod,
# so gating it out of :prod is what keeps those generated modules from landing
# in consumers' builds — where they'd clash with a consumer that also runs the
# compiler. See config/config.exs for the `:all` vocabulary used here.
defp compilers(:prod), do: Mix.compilers()
defp compilers(_), do: Mix.compilers() ++ [:seo_jsonld]

# Run "mix help compile.app" to learn about applications.
def application do
[
Expand Down
Loading