I have an umbrella app with an existing Phoenix app inside. I want to add another phoenix app, listening on a different port.
I ran mix phx.new.web internal_ui --no-ecto --no-mailer
from the apps
folder of my umbrella to generate the app. All looked good. I changed the port to 4001 for the new app.
However, I noticed that when I built and ran my application, my assets for the new app did not get built. No app.js
. No app.css
. No minified or gzipped files.
Looking deeper, I see that there are two config :esbuild
entries in the config.exs
, and the one for the new app is first. Won’t the configuration for the second overwrite the first? When I move the esbuild config for the new app below the one for the original web app, my app.js
does get built in the priv/static
of my new app, but no CSS files get built.
How can I get my priv/static files
to build for multiple Phoenix apps?