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

Pre-render pages + build to JSON (or some other format) for smaller bundle size. #85

Open
NullVoxPopuli opened this issue Mar 22, 2021 · 2 comments

Comments

@NullVoxPopuli
Copy link
Contributor

As a design system grows, it'd be great to offload most of the content to be on-demand.

So, maybe:

  • all the pages are pre-rendered
  • but when doing in-app transitions, each page (or group of pages? idk) is a remote request?
@josemarluedke
Copy link
Owner

Yeah, I thought about this, but I don't like the idea of sending the JSON with HTML/Handlebars over. It would also mean we need to compile templates on the client. A different approach would be relying on Route Splitting as other documentation sides do. In Ember, you can do that using Embroider.

Note, Embroider doesn't work with Prember yet: ef4/prember#59

@NullVoxPopuli
Copy link
Contributor Author

I think I would still like an option to do this, because for a mostly internal set of docs, shipping the compiler is an acceptable tradeoff, and we want to optimize build time. Our docs at this moment can take ~ 20-30 minutes to build on C.I. now. I believe 15-20 of those minutes could be totally eliminated by just not compiling all those docs during the build.
Waiting for embroider isn't really an option because a giant tree of dependencies that need support first 🤔

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

2 participants