Repository navigation
worker-build: leave the Emscripten glue unminified - #1131
Merged
Merged
Conversation
Member
|
I've posted #1137 as an alternative here which entirely removes the need for esbuild. Might be simpler to lean entirely only on the one run in wrangler? |
Contributor
Author
Yes this is a way better alternative than this PR and just using the esbuild in wrangler. Emscripten may still need to pass a no minify flag to let esbuild perform minification so leaving that commit here and will edit the description once #1137 passes. |
Member
|
Sounds good, #1137 has now landed on main. |
emcc minifies its glue onto one line, so wrangler's source map points every glue frame at that line under emcc's short names. With --minify=0 they get real lines and names.
JesusFileto
force-pushed
the
js-glue-source-maps
branch
from
November 12, 2026 01:19
45447be to
e89d5ff
Compare
guybedford
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #1137, wrangler bundles worker-build's output and uploads a source map for it, so frames in the shim, the wasm-bindgen glue and
build/snippets/, includinginline_js, already resolve to their own files and lines, with function names kept. Emscripten builds are the exception: emcc minifies its own glue at-O2into a single line, so every frame in it maps to that line plus a column, under the short names emcc gave its functions. Linking with--minify=0gives those frames real lines and names:new PanicErrormaps tobuild/index_bg.js:2904:10instead ofbuild/index_bg.js:4:47386. The.wasmand its source map don't change.