Project does not recompile when changing a config

I have created a project to reproduce the problem:

It’s an umbrella app with one app (a phoenix app). There is a config

config :hello,
  enable_endpoint: true

and a router which consumes that config

    if HelloWeb.Config.enable_endpoint() do
      get "/toggled_endpoint", PageController, :toggled_endpoint

and it basically works.

The problem is, that if i switch the flag to false and restart the server, the endpoint is still there. I have to modify router.ex (e.g. add an empty line) so mix picks up the change and recompiles everything.

I already have an answer to the problem, which is the @external_resource annotation (

What confuses me though is, that according to the following comment, the project should recompile on changes to config: Mix will not recompile the app when change the "config.exs" in umbrella.

Am i missing something?

How do you restart the server, and which file do you have the config in?

I kill the process with ctrl-c and then run mix phx.server.


This has been fixed in the meanwhile: