bevacqua/horsey

unable to use with an isomorphic js setup

adamjv90 opened this issue · 3 comments

If you try to require in horsey from a js file that is run from server (even if the creation of the horsey object does not happen on server) then your scripts are unable to run with the following error: ReferenceError: document is not defined . This also happens in horseys' dependencies. type checking document before using it seems to be the simplest solution. As a note I am trying to get horsey to work with a isomorphic react setup.

This is a React problem.

@bevacqua After reading threw that article you sent and making a few adjustments to a couple components I was able to get it working by simply swapping in requires instead of imports. I really appreciate you pointing that out for me!!