geolessel/react-phoenix

Don't check react-stdio presence at compile time

jsteiner opened this issue · 2 comments

Would it be possible to check for react-stdio at runtime instead of compile time? I'm deploying to Heroku, which provides:

  1. A step for installing and compiling Elixir and it's dependencies
  2. A step for installing yarn/npm dependencies.

The way this library currently works requires you to:

  1. Install Elixir & dependencies (to have the react-phoenix.js file available for yarn)
  2. Install yarn dependencies (to have react-stdio available for compilation)
  3. Compile Elixir.

This is an issue, as the buildpacks for Heroku don't provide an easy way to split up the Elixir install/compile steps.

An added benefit is that then we wouldn't require react-stdio to be installed if you aren't using the ServerSide functionality.

@jsteiner I've considered doing something like this in the past. When I have a few free moments, I'll explore what this might look like. In the meantime, if you have an implementation that you'd like to submit, I'd be happy to take a look.

#24 I've removed all server-side rendering code from release v0.5.0.