github-community-projects / github-community-projects/org-metrics-dashboard
Improve SSR by removing Webpack dependency
- Dominant language
- TypeScript
- Stars
- 85
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
@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. #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
Contributor guide
Assessment
This issue has not been assessed yet.