Closed NuroDev closed 2 months ago
FYI for others coming here during triage, I still need to figure out if this belongs here because of the prerendering changes or the adapters repo, cause we should fix it inside the adapter.
I did do a quick test as well using the Node.js adapter & it showed that the dist/server/
bundle also increased in size but only by ~4kb (More inline with the version bump increase in size) so it could be something specific to the Cloudflare adapter as the impact there seems way more impactful & like the Node.js adapter is actually "cleaning up" correctly.
I think this belongs in core. Looks like it's because of https://github.com/withastro/astro/pull/11245#discussion_r1636593458 which I was mistaken of reverting it. I'll make a fix for this.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The other week I got a regular pull request from dependabot to bump some dependencies for my personal website but I noticed CI was failing.
After looking into it a bit more it seemed that the bump of
astro
from4.10.2
to4.11.*
was increasing the total size of the_worker.js
for Cloudflare just over the limit of what Cloudflare allows (I have not does any optimisation on my end so chances are there are a few things I could be doing better anyway to make this a non-issue).After digging into it a bit more I found the cause: The final
dist/
output is no longer omitting / pruningsatori
(Which I use to generate OpenGraph image) from the_worker.js/chunks
directory.What's the expected result?
I mentioned this in the Astro Discord & @alexanderniebuhr mentioned that:
So ideally either it would be good for the output to be the same size as the previous
4.10.2
version or at least only slightly larger.Link to Minimal Reproducible Example
https://github.com/nurodev/astro-4.11-build-size-increase
Participation