-
-
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
Refactor prerendering chunk handling #11245
Conversation
🦋 Changeset detectedLatest commit: d0bd620 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 |
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.
Left some review notes below
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Awesome work @bluwy !
!preview refactor-prerender |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
Changes
NOTE: This is a big PR but mostly due to test changes/additions.
This PR changes how chunks are handled for prerendering. Before:
page.route.prerender
metadata is derived inmanualChunks
(slow)page.route.prerender
is true, it's grouped into a special "prerender" chunk.After:
page.route.prerender
metadata is derived ingenerateBundle
(faster)generateBundle
, we figure out chunks that are used in prerender-only, and track them to be deleted at the end.Testing
It includes test from #10738
There are also a lot of changes related to
outDir
, because each page are now its own input chunk, when we build fixtures multiple times, ESM could cache the input chunk path, causing subsequent fixtures runtime to use the previous, which is problematic also for CCC.Docs
n/a. Mostly a bug fix and it shouldn't affect Astro projects in practice.