Well, I was able to make live reloading and assets compilation work again for the myapp_admin app, buy updating the following files in the myapp_web app:
File: myapp_web/config/dev.exs
...
config :myapp_web, MyApp.Web.Endpoint,
watchers: [
node: ["node_modules/brunch/bin/brunch", "watch", "--stdin", cd: Path.expand("../assets", __DIR__)], # watch myapp_web
node: ["node_modules/brunch/bin/brunch", "watch", "--stdin", cd: Path.expand("../../myapp_admin/assets", __DIR__)] # watch myapp_admin
]
...
config :myapp_web, MyApp.Web.Endpoint,
live_reload: [
patterns: [
# myapp_web
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{lib/myapp_web/views/.*(ex)$},
~r{lib/myapp_web/templates/.*(eex)$},
# myapp_admin
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{lib/myapp_admin/views/.*(ex)$},
~r{lib/myapp_admin/templates/.*(eex)$},
]
]
File: myapp_web/lib/myapp_web/endpoint.ex
...
# myapp_web
plug Plug.Static,
at: "/", from: :myapp_web, gzip:false,
only: ~w(css fonts images js favicon.ico robots.txt)
# myapp_admin
plug Plug.Static,
at: "/", from: :myapp_admin, gzip:false,
only: ~w(css fonts images js favicon.ico robots.txt)
...
Ofc, this doesn’t look like a very elegant solution, but it works!!
I was wondering if there’s another way to work this out or improve this solution… Any ideas?
Thank you very much!






















