You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is normally a simple fix for this, just import the module with SSR disabled, like so: Advanced Features: Dynamic Import | Next.js 1. I can see that the template does seem to have support for dynamic:
In particular, I don’t seem to have control over where the underlying rescript-request module gets imported and therefore am not sure how to annotate that import with dynamic.
The text was updated successfully, but these errors were encountered:
I’m using rescript-request https://github.com/bloodyowl/rescript-request 3 to issue XMLHttp requests in my Vercel site. Unfortunately, Vercel attempts to aggressively use server side rendering and XMLHttp has no implementation in node.js.
As a result, I get the following error:
Error occurred prerendering page "mypage". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: XMLHttpRequest is not defined
There is normally a simple fix for this, just import the module with SSR disabled, like so: Advanced Features: Dynamic Import | Next.js 1. I can see that the template does seem to have support for dynamic:
rescript-nextjs-template/src/bindings/Next.res
Line 141 in 260c38a
But how do I put this together?
In particular, I don’t seem to have control over where the underlying
rescript-request
module gets imported and therefore am not sure how to annotate that import with dynamic.The text was updated successfully, but these errors were encountered: