Skip to content

fix(astro): Delete generated source maps for static output - #25310

Merged
Lms24 merged 2 commits into
lms/fix-astro-prerender-sourcemapsfrom
lms/fix-astro-static-sourcemaps-cleanup
Oct 14, 2026
Merged

Lms24 merged 2 commits into
lms/fix-astro-prerender-sourcemapsfrom
lms/fix-astro-static-sourcemaps-cleanup

Conversation

@Lms24

@Lms24 Lms24 commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

When the SDK turns on hidden source maps, it deletes them after upload with globs for client and server folders. Static output has neither folder and writes client assets to <outDir>/_astro, so the maps stayed in dist and got deployed. This also deletes maps in the build.assets folder, and turns the leftover-maps check back on for the static variant of the astro-7-sourcemaps e2e app. Found while working on #25304.

@Lms24
Lms24 added this pull request to stack #25311 October 13, 2026 08:29
@Lms24
Lms24 marked this pull request as ready for review October 13, 2026 09:05
@Lms24
Lms24 requested a review from a team as a code owner October 13, 2026 09:05
@Lms24
Lms24 requested review from nicohrubec and s1gr1d and removed request for a team October 13, 2026 09:05
@Lms24 Lms24 self-assigned this Oct 13, 2026
Lms24 and others added 2 commits October 13, 2026 16:07
When the SDK enables hidden source maps, it deletes them after upload with
`./dist/**/client/**/*.map` and `./dist/**/server/**/*.map`. Static output
has neither folder and writes client assets to `<outDir>/_astro`, so the
maps stayed in `dist` and got deployed. Also delete maps in the
`build.assets` folder.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Astro removes the hidden `.prerender` folder at the end of the build, so
these maps don't end up in the output today. Delete them ourselves anyway,
so we don't rely on Astro internals for maps the SDK turned on.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the lms/fix-astro-static-sourcemaps-cleanup branch from 11c7708 to 7af7d56 Compare October 13, 2026 14:08
@Lms24
Lms24 merged commit e8cc354 into develop Oct 14, 2026
53 of 82 checks passed
@Lms24
Lms24 deleted the lms/fix-astro-static-sourcemaps-cleanup 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

Development

Successfully merging this pull request may close these issues.

2 participants