-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide SSR support #2074
Comments
Server-side rendering is certainly something we want to support, but we don't yet have it as a prioritized roadmap item. We have done cursory exploration into making it work for basic prototyping with Gatsby. The gist is that node needs some polyfills for DOM globals (https://github.com/elastic/gatsby-eui-starter/blob/master/gatsby-node.js). Similar things would be possible with Next.js If we get more formal with that ^ repo, we can update this issue with the approach. |
@thompsongl Thanks for explanation. I've tried to replicate that Gatsby sample to NextJS but doesn't works for me. I hope that there will be some advancement toward SSR support in the future. |
Hello, I have transformed the gatsby config to a valid next.config.js Kr, |
Thanks for that, @b-barry! |
@b-barry Thank you for sharing your solution!
I have |
|
I just opened an issue (#2185) related to those dnd types. I think we need to remove them from |
@chandlerprall unfortunately, simple @thompsongl great to hear! |
This is working. Thanks @b-barry . For those who missed, don't forget to add |
+1 for SSR support in next.js, this would take EUI to the top in my opinion.. testing now with the configuration provided. |
As long as you are using it as a back office, you don't need SSR. You can currently leverage the framework within nextJS using the above "hack". Ima write an article on that soon. I think typescript support completed is more important atm. |
Which configuration do you use for build with css… I was doing such a thing
To get CSS but looks like it's not shipped and with the above hack it only works in dev mode |
Inspired by this post, I put together a Next.js starter. Feedback welcome! |
@pugnascotia Oh! That's my post 😆 Glad to see that it is useful :) it's not perfect as CSS is stripped and mocked, but it works, especially with static rendering :) |
Yes, thank you very much @ScreamZ for the inspiration!
Can you elaborate? If something isn't working, I'd like to fix it. If you could open an issue on the repo, that'd be great 👍 |
@pugnascotia That starter is super useful! I did just drop this minor issue on it (elastic/next-eui-starter#5), as it seems that the nav drawer doesn't have the expected behavior when it's locked. Thanks again for adding it! |
Please support SSR for Current solution:
|
@pugnascotia +1
|
@ScreamZ Do you have a git repo for your Medium article? I like how minimal a starter would be from that piece. |
Nope because the article was small enough to allow reproduction from a barebones nextjs app |
@ScreamZ sounds good, I went ahead and did that, thanks! |
Thanks to @pugnascotia for the NextJS starter for EUI. That satisfies the original ask of this issue. If you have special needs of the starter, please open an issue in that repo. |
It would be fantastic to run EUI in NextJS
EUI is a clear winner for me in category of publicly available design systems. Unfortunately this is a showstopper.
Can somebody confirm that it is doable and try to explain conceptual approach how to implement it ?
This feature request relates to #1830
The text was updated successfully, but these errors were encountered: