Phoenix: Live reload the browser when files outside the project root change

We have a Phoenix project located at /some/path/A
That project uses a library located at /some/path/B

B is a component library with its own css and javascript files.
We are watching those files for changes from within A and build them (working fine).

The browser doesn’t live reload after the build process.

We added the path of the built files within B to the live_reload: patterns: config, without success.

On A we have:

config :aaa, AAAWeb.Endpoint,
  live_reload: [
    patterns: [
      ~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
      ~r"lib/aaa_web/templates/.*(eex)$",
      ~r"../B/priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$"
    ]
  ]

Any hints on how to achieve that?

1 Like

I never managed to make this setup work.

I had to hack and transform my A application into an umbrella and create in its apps/ folder a symlink to project B

Thank you.

Will think about that.

Cheers