-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feature(astrojs/cloudflare): add support for splitted
SSR bundles
#7464
feature(astrojs/cloudflare): add support for splitted
SSR bundles
#7464
Conversation
🦋 Changeset detectedLatest commit: aaf1ff6 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 |
split
in astrojs/cloudflaresplit
in astrojs/cloudflare
split
in astrojs/cloudflaresplitted
SSR bundles
@ematipico first of all, sorry for pinging. But I would like to get this one out as soon as possible; I think having experimental support is in any way better than having no support! Iteration in the future can improve the support. Not sure if you are the correct one to review, but if you can help with getting this on track would be amazing. |
This comment was marked as resolved.
This comment was marked as resolved.
This looks great! Left a couple of comments on the code, but overall like the implementation. Just so I understand, this is not toggling split on at the integration, but rather respecting the user's |
Yes this is totally right. It just makes current cloudflare adapter work with the following user options (while before it was just breaking): adapter: cloudflare({ mode: 'directory' }),
build: {
split: true,
excludeMiddleware: true
}, |
This comment was marked as outdated.
This comment was marked as outdated.
Hey @alexanderniebuhr This is looking great! Have been talking about the Leaving a note here on that issue just because I don't think there's a better place. @ematipico in my investigation what I see is:
|
This comment was marked as outdated.
This comment was marked as outdated.
!preview cloudflare-split |
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.
The first round of code review. It looks good to me, nothing major from my point of view, and the tests seem solid.
Let's wait for the docs team
By the way, @alexanderniebuhr , this contribution of yours is fantastic! Great work, and thank you! 🚀 |
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.
Thanks for this helpful contribution, @alexanderniebuhr! I'm sure people are going to appreciate this!
Left some suggestions for your consideration based on:
- Is this actually "experimental" (i.e. behind a flag?) vs just "new"?
- Changesets are now being used to autogenerate blog post material, so congrats, this PR is suffering through those growing pains of changeset editing, not just README editing! 😄
- suggestion to maybe not refer to the optional config so early on, front-loading an already kind of big/explainy paragraph of the default behavior, and letting the 2nd paragraph do the heavy lifting?
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
splitted
SSR bundlessplitted
SSR bundles
Co-authored-by: Sarah Rainsberger <[email protected]>
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.
Docs is happy! 🥳
…7464) * initial commit * try to fix windows * output files directly into the correct folder * allow for rest parameters * use fixed hook * improve tests * apply doc's team suggestions for README Co-authored-by: Sarah Rainsberger <[email protected]> * try to fix prerendering * apply doc's team suggestion for changeset Co-authored-by: Sarah Rainsberger <[email protected]> * bump to minor * readme update * resolve review comments * optimize memory allocation * resolve review comments * add removed link, to make sure old docs keep same * resolve comment Co-authored-by: Sarah Rainsberger <[email protected]> --------- Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: Chris Swithinbank <[email protected]>
Changes
DEMO: https://astro-ssr-split-directory.pages.dev
build.split
in astrojs/cloudflaredoes not work with prerenderd pages yet (however that seems to be a bug inbuild.split
itself SSRsplit
seems to not output prerendered html pages #7466) @ematipico can you help?is not yet tested with dynamic rest routes[...props].astro
split
does not work with Cloudflare #7462split
mode #7220split
option docs#3504Tasks
Testing
Docs
/cc @withastro/maintainers-docs for feedback!