Support for server side rendering #184
-
Hello, Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 14 replies
-
Please elaborate on "lots of issues" and provide details of your server environment. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks. I don't think SSR can be made to work for an interactive iModel viewer. |
Beta Was this translation helpful? Give feedback.
-
Just want to clarify, since I think there's been a bit of a miscommunication here regarding what kind of SSR we're talking about. @pmconne is right that rendering viewports will always require an actual browser, but assuming you mean React Server Side Rendering - that should (at least in theory) be partially supported. We are working on fixing those However, I should also note that we are not doing any SSR of our frontends and have no plans to at this time, so there's a good chance it takes a bit more work to get SSR fully setup. We assume all iModel.js frontends are largely interactive single-page applications, so I wouldn't expect to see much immediate benefit to enabling SSR. In short, we've found SSR to be unnecessary, but YMMV. |
Beta Was this translation helpful? Give feedback.
-
@calebmshafer @pmconne Any updates on the reply |
Beta Was this translation helpful? Give feedback.
-
Hi, @hsanand61564, The AppUi system for iTwin.js has some features and implementation details that make it unfriendly to SSR, including: Refactoring for AppUi for SSR might be possible, but not for a minor release. It would be helpful if you could tell us what you want to do with SSR and what parts of the UI you’re using. |
Beta Was this translation helpful? Give feedback.
Just want to clarify, since I think there's been a bit of a miscommunication here regarding what kind of SSR we're talking about.
@pmconne is right that rendering viewports will always require an actual browser, but assuming you mean React Server Side Rendering - that should (at least in theory) be partially supported. We are working on fixing those
document is not defined
errors you're getting now.However, I should also note that we are not doing any SSR of our frontends and have no plans to at this time, so there's a good chance it takes a bit more work to get SSR fully setup. We assume all iModel.js frontends are largely interactive single-page applications, so I wouldn't expect to se…