There's so much information here Gavit. Nicely done 👍👍👍
Doing that in a Node app, though, will instantly crash your app during transitions since this is exactly the sort of state that Node will preserve. That means initialising the coilMonetizationPolyfill needs to look like this on every page:
This seems classic problems for frameworks that combine client-side hydration and server-side rendering, like Nuxt, Next, Sapper/SvelteKit. They run the code twice both in backend and frontend and since backend doesn't have document object thus the crash - which is why the solution is skipping the server-side by checking if process.client is truthy. I think traditional Node app that uses SSR without client-side rehydration (or detaching client-side framework from the server-side code) should be fine.
For further actions, you may consider blocking this person and/or reporting abuse
There's so much information here Gavit. Nicely done 👍👍👍
This seems classic problems for frameworks that combine client-side hydration and server-side rendering, like Nuxt, Next, Sapper/SvelteKit. They run the code twice both in backend and frontend and since backend doesn't have
document
object thus the crash - which is why the solution is skipping the server-side by checking ifprocess.client
is truthy. I think traditional Node app that uses SSR without client-side rehydration (or detaching client-side framework from the server-side code) should be fine.