Node installed module, adding css

Is there a guide of how to use node installed modules in Phoenix. I have esbuild + tailwind app and would like to make use of 3rd party modules.

  1. Is there a way to include js conditionally so it only gets loaded for certain phx-hooks?
  2. If a node module has css, how can this be integrated into the app.css. I tried to do a @import in the app.css, but this did not work. I assume this is because tailwind is processing css and is not handling the @import??