ghcjs / jsaddle

JavaScript interface that works with GHCJS or GHC
116 stars 62 forks source link

Detect node system better #111

Closed matthewbauer closed 4 years ago

matthewbauer commented 4 years ago

Some things like webpack create the “global” variable so we cannot rely on just that to detect nodejs systems. To supplement this, we can also check for the “require” function. This fixes an issue where require is undefined when using jsaddle-warp.

/cc @hamishmack @Ericson2314