Skip to content
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

Improve SSR by removing Webpack dependency #115

Open
3 tasks
ipc103 opened this issue Mar 21, 2024 · 0 comments
Open
3 tasks

Improve SSR by removing Webpack dependency #115

ipc103 opened this issue Mar 21, 2024 · 0 comments

Comments

@ipc103
Copy link
Collaborator

ipc103 commented Mar 21, 2024

@ajhenry were investigating some issues with Server Side Rendering in the Next App. We noted that the entire page seemed to be client-side rendered, and static content wasn't preserved/cached between refreshes. It seems like there were a couple of issues:

  1. Add documentation page and banner to new users #113 added documentation by parsing markdown files at runtime. Part of this involved adding a webpack config option to the Next config to be able to read in the .md files. This appears to be causing issues with server side rendering.
  2. We also noticed that the Primer theme only ever hydrates client-side, causing certain colors to flicker on page change.

I'm proposing we do a couple things to address this:

  • Try to remove our webpack dependency. We could potentially move the Markdown -> HTML generation out of the runtime generation and into the initial compile step instead. This should improve our SSR capabilities
  • For the theme issue, look for a corresponding issue in https://github.com/primer/react/issues and open one if it doesn't exist
  • For Bonus Points: open a PR to fix the issue in Primer and update our primer/react version when accepted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant