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

Support conditionally running single BTR pages on request in watch/serve #367

Closed
matt-gadd opened this issue Jan 21, 2020 · 0 comments · Fixed by #388
Closed

Support conditionally running single BTR pages on request in watch/serve #367

matt-gadd opened this issue Jan 21, 2020 · 0 comments · Fixed by #388
Labels
enhancement next Issue/Pull Request for the next major version

Comments

@matt-gadd
Copy link
Contributor

Enhancement
At the moment it's extremely slow to run BTR in watch mode with a large amount of pages. This is due to us not being able to determine what to incrementally/partially render per build. It's unlikely it's ever going to be possible to determine what changed between a build and a page.

What we can do though, is take advantage of when in watch and serve mode we can conditionally render just the page that is being requested at the point of request. This would mean we would only render 1 page in BTR per page visited, effectively making the BTR part no cost during in development.

This will require some changes to the BTR plugin to be able to execute for just a single page, and completely decouple it from webpack. We can then write a small express middleware that runs BTR based on the request made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement next Issue/Pull Request for the next major version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant