Closed darkadept closed 7 years ago
It just depends on each component. google-maps-react
may not support SSR right now, which wouldn't be too surprising since the google maps api is probably client-side-only. To work around these kinds of issues you can render a loading placeholder if Meteor.isServer
.
Yeah, makes sense.
Is there a way to disable SSR? I don't need it and it's causing more headaches than usefulness.
Yeah, I don't use it my real project yet either... Just change this line to check some other environment variable or get rid of that block entirely. I should probably make a separate switch for it in this project as well.
@darkadept sorry, that was not right. Let me dig a bit deeper. I'll try to PR a flag to turn off full SSR right now.
I'm trying to use a component that is trying to use the global
window
object (google-maps-react). In dev mode it works fine, but in prod mode the server webpack config has trouble. Obviouslywindow
is not defined on the server.How does one use these kind of components with SSR?