-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Added preact-prepass-render to @astrojs/preact #7569
Conversation
🦋 Changeset detectedLatest commit: 8059151 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
2000d0f
to
2851c42
Compare
2851c42
to
bd2394b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that I don't think the Preact integration README needs updating for this, as it was never explicitly stated that you couldn't do this before, and we're just adding some functionality under the hood.
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
do I need to do something else? I see that not all checks passed, but I can't restart them |
No worries @aleksandrjet, we just have a couple of flaky CI tests that we're trying to track down! We're working through our backlog of PRs right now, hoping to give this a proper review soon! |
Also I reached out to Marvin on Twitter about this one to check if |
@natemoo-re did you ever hear back about this? |
Changes
Added
preact-ssr-prepass
library to preact integraiont. This library allow to use lazy components in preact code. Without this i get unknown error in SSR.While execute SSR
preact-ssr-prepass
will wait to load all dynamic imports so thatpreact-render-to-string
can use they. More details about preact-ssr-prepassTesting
Added
examples/lazy-preact
andpreact-lazy-component.test
with lazy loading of component.Docs
I don't think that it needs documentation, because i expected that Suspense and lazy functions will work.
It does not affect the current api, but it can slow build execution of preact components, because
preact-ssr-prepass
will add extra pass of tree. This pass will wait for all dynamic imports to be loaded, even if they don't exist in the code.