[@mel.scope "window"] [@mel.return nullable]
external enablePatches: option(bool) = "ENABLE_PATCHES";
should generate a raising fn in native:
let enablePatches = _ => raise(Impossible_in_server(...))
This might be a bit trickier since we need to count arities, including mel.send and mel.send.pipe, but regardless core from melange.ppx should help here.
Error message should be more descriptive
[server-reason-react.melange_ppx] There's an external in native, which should
only happen in JavaScript. You need to conditionally run it, either by not
including it on native or via let%browser_only/switch%platform. More info at
https://ml-in-barcelona.github.io/server-reason-react/local/server-reason-react/browser_only.html
[server-reason-react.melange_ppx] There's an external in native, which should
only happen in JavaScript. You need to conditionally avoid it, either by not
including it on native and run inside a let%browser_only/switch%platform function. More info at
https://ml-in-barcelona.github.io/server-reason-react/local/server-reason-react/browser_only.html
should generate a raising fn in native:
This might be a bit trickier since we need to count arities, including mel.send and mel.send.pipe, but regardless core from melange.ppx should help here.
Error message should be more descriptive