Selectively building umbrella apps based on Mix.env()

Hello People

lets say we have an umbrella with 3 apps my_app, your_app and dev_only_app

we would like to have the dev_only_app only on :dev since its a bunch of helpers that facilitate local development workflow and just not ship it to prod.

Is this even possible? we have workarounds with git submodules. wondering if there is a simpler way using just Mix “magic” :slight_smile:


Have a look at the docs for the Mix.release task under the Umbrellas section.

1 Like

I assume that by “not ship to prod” you mean that dev_only_app should not be included in the final app that you run in production?

In that case, if you’re using mix releases, you can exclude the dev-only app from the ones that will go into the release: mix release — Mix v1.13.4

And you’d also need the other apps to import the dev-only app with the only: :dev flag in their dependencies, if they don’t do so already.

1 Like