View Source mix loadconfig (Mix v1.17.0-dev)

Loads and persists the given configuration.

$ mix loadconfig path/to/config.exs

Any configuration file loaded with loadconfig is treated as a compile-time configuration. This means all application keys are merged into their respective applications, however the values themselves are not deep merged.

config/config.exs is always loaded automatically by the Mix CLI when it boots. config/runtime.exs is loaded automatically by mix app.config before starting the current application. Therefore there is no need to load those config files directly.

This task is automatically re-enabled, so it can be called multiple times to load different configs.