Skip to content

Serve UI extension source maps during app dev - #8260

Merged
vividviolet merged 1 commit into
stable/4.6from
fix-ui-extension-source-maps
Aug 6, 2026
Merged

Serve UI extension source maps during app dev#8260
vividviolet merged 1 commit into
stable/4.6from
fix-ui-extension-source-maps

Conversation

@vividviolet

Copy link
Copy Markdown
Member

The built bundle ends with a relative //# sourceMappingURL=<handle>.js.map, so the browser requests the map next to the asset's own URL — /assets/<target>/<handle>.js.map — a key no asset payload emits. The request 404'd and DevTools only ever showed minified output.

Register that key on the asset resolver when the map exists, and serve .js.map requests from the extension directory. Maps are deliberately absent from the bundle: keepBuiltSourcemapsLocally moves them back into the extension directory so .js.map files never reach a deploy bundle. No build step changes, so that invariant is untouched.

Unregistered .js.map paths 404, keeping the resolver the allowlist for this route.

Assisted-By: devx/5a367c53-dfe0-42d0-8b9f-5258f54d589a

The built bundle ends with a relative `//# sourceMappingURL=<handle>.js.map`, so
the browser requests the map next to the asset's own URL —
`/assets/<target>/<handle>.js.map` — a key no asset payload emits. The request
404'd and DevTools only ever showed minified output.

Register that key on the asset resolver when the map exists, and serve `.js.map`
requests from the extension directory. Maps are deliberately absent from the
bundle: `keepBuiltSourcemapsLocally` moves them back into the extension
directory so `.js.map` files never reach a deploy bundle. No build step changes,
so that invariant is untouched.

Unregistered `.js.map` paths 404, keeping the resolver the allowlist for this
route.

Assisted-By: devx/5a367c53-dfe0-42d0-8b9f-5258f54d589a
@vividviolet
vividviolet requested a review from a team as a code owner August 6, 2026 19:25
@vividviolet
vividviolet changed the base branch from main to stable/4.6 August 6, 2026 20:50
@vividviolet
vividviolet merged commit 597a4a6 into stable/4.6 Aug 6, 2026
1 check passed
@vividviolet
vividviolet deleted the fix-ui-extension-source-maps branch August 6, 2026 20:51
craigmichaelmartin added a commit that referenced this pull request Aug 7, 2026
The push event from merging #8260 never triggered the Release workflow,
so the Version Packages PR for 4.6.1 was not created. Empty commit to
re-deliver the push trigger.
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