I have two seperate js & css files relating to two external HTML projects and I want them to be bundled into two different folders within priv/static/assets.
My current setup for one of my projects is:
FYI: I’m sure someone can tell you how to do whatever you want with the elixir wrapper for esbuild, but I really think if you need anything beyond the bare minimum, you should just use esbuild directly. It’s not difficult to do, I can provide some help if you’re interested in that.
I am not sure, because I haven’t tried, but can’t you just make a second next to :default and add a second watcher for this and a second esbuild in mix.exs, etc…
With this solution will I be able to watch for any changes to the .js and .css bundles whilst I am in dev mode running iex -S mix phx.server and have the files automatically updated in priv/static/assets?
Not sure what else you think would be more direct, given the elixir package is not really a wrapper, but just a different way of downloading the binary.
Because you can interact with the NPM ecosystem directly, write your own JS script that runs ESBuild instead of relying upon it’s CLI interface, etc. I think they even say themselves that the CLI interface is meant for quick use.