Repository navigation
Conversation
Release bundles already advertise sourceMappingURL, but maps were only embedded in Debug, so production tooling hit 404s (#3689). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
We did this because old maps could acrue and we're being checked in. At some point our binary size started ballooning. Are we sure parcel cleans up old versions properly now? |
Will check |
Parcel does not empty distDir. Cleanup now runs inside NpmRunBuild so stale hashed maps cannot accumulate into the embedded AOT binary. Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Parcel does not empty
|
Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3693/ |
There was a problem hiding this comment.
APPROVE: no actionable issues found.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Main replaced Parcel with Vite and already deletes stale hashed outputs inside NpmRunBuild, so the conflicting cleanup block in the Site csproj is taken from main. The branch's remaining change, embedding source maps in every configuration, is re-applied to main's EmbedGeneratedAssets globs. EmbeddedStaticAssetTests is ported to TUnit and to the Vite layout: it now checks main's cleanup and the unconditional map embeds, and only asserts JS maps in the assembly because Vite emits no CSS maps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| var csproj = File.ReadAllText(SiteCsprojPath()); | ||
| csproj.Should().Contain("""Include="_static/main-*" """); | ||
| csproj.Should().NotContain("CleanOldHashedAssets"); |
There was a problem hiding this comment.
Severity: P3 (Low)
This cleanup test passes even if the Delete task is removed or cleanup is moved outside NpmRunBuild: it only checks that a glob appears somewhere in the project and that one target name is absent. It therefore does not protect the stale-map cleanup or incremental-build safety that this test claims to cover. Add coverage that verifies stale bundles and maps are deleted when the target runs and current outputs survive when it is skipped.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
Release builds now ship the Parcel source maps that the bundles already reference. Production no longer 404s those
.mapfiles.Affects: Site UI
Prompt summary: Publish usable source maps with the production documentation bundles. Confirm that old hashed maps cannot pile up in the AOT binary.
Why
Release bundles already contain
sourceMappingURLcomments. The Site project only embedded.js.mapand.css.mapin Debug, so Lighthouse and production debuggers hit 404s (#3689). Parcel does not emptydistDir. Old hashed maps used to accumulate and bloat the binary, which is why maps were Debug-only.What
Production source maps
EmbedGeneratedAssetsincludes*.js.mapand*.css.mapin every configuration. Static serving already maps.mapto JSON.Hashed asset cleanup
Cleanup no longer waits for
IsPublishing.NpmRunBuilddeletes hashed JS, CSS, and maps immediately before Parcel runs. Incremental builds that skipNpmRunBuildkeep the current chunks.Verify
Out of scope: The external
https://www.elastic.co/elastic-nav.jsmap.Closes #3689