Skip to content

fix(astro): Upload source maps of Astro 7's prerender build - #25309

Merged
Lms24 merged 1 commit into
developfrom
lms/fix-astro-prerender-sourcemaps
Oct 14, 2026
Merged

Lms24 merged 1 commit into
developfrom
lms/fix-astro-prerender-sourcemaps

Conversation

@Lms24

@Lms24 Lms24 commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Astro 7 writes the prerender build to a hidden .prerender folder, and our default <outDir>/**/* assets glob does not go into dot folders, so the upload found nothing and logged a warning. This PR adds <outDir>/**/.prerender/**/* to the default globs. These chunks only run at build time, so the gain is small, but it removes the warning and covers errors captured during prerendering. Also adds an astro-7-sourcemaps e2e app that checks the uploads for server and static output. Fixes #25304

@Lms24
Lms24 added this pull request to stack #25311 October 13, 2026 08:29
@Lms24 Lms24 changed the title lms/fix astro prerender sourcemaps fix(astro): Upload source maps of Astro 7's prerender build Oct 13, 2026
@Lms24
Lms24 marked this pull request as ready for review October 13, 2026 09:03
@Lms24
Lms24 requested a review from a team as a code owner October 13, 2026 09:03
@Lms24
Lms24 requested review from nicohrubec and s1gr1d and removed request for a team October 13, 2026 09:03
@Lms24 Lms24 self-assigned this Oct 13, 2026

@s1gr1d s1gr1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question: Do we delete the source maps again in case only Sentry enabled them in .prerender?

@Lms24

Lms24 commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Just one question: Do we delete the source maps again in case only Sentry enabled them in .prerender?

Good question! In this case the answer is "not us", since Astro already deletes the .prerender folder after the build. Our globs, also after the update in, #25310 don't. Or rather didn't because I think we can just be a bit extra careful here and also add the .prerender glob to the deletion globs. The e2e test also asserts that no .map files remain in the dist folder.

Astro 7 writes the prerender build to a hidden `.prerender` folder, which
the default `<outDir>/**/*` assets glob does not enter. The upload found no
files and logged "Didn't find any matching sources for debug ID upload".
Add an explicit `<outDir>/**/.prerender/**/*` glob to the defaults.

Add an `astro-7-sourcemaps` e2e app that checks what gets uploaded for
server and static output.

Fixes #25304
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the lms/fix-astro-prerender-sourcemaps branch from 2499c99 to 9afeeb5 Compare October 13, 2026 14:08
@Lms24
Lms24 merged commit d57cce7 into develop Oct 14, 2026
50 checks passed
@Lms24
Lms24 deleted the lms/fix-astro-prerender-sourcemaps branch October 14, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants