Infer upload_source_maps setting in the output Worker config from the build.sourcemap setting in the Vite config#12446
Merged
jamesopstad merged 3 commits intomainfrom Feb 6, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 188c9cb The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Claude finished @jamesopstad's task —— View job Changeset Review✅ All changesets look good The changeset in
The changeset has a clear title, explains what the feature does, provides a usage example, and notes the precedence behavior when |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
ee022d6 to
16face5
Compare
16face5 to
188c9cb
Compare
vicb
reviewed
Feb 6, 2026
| () => { | ||
| const wranglerConfig = JSON.parse( | ||
| fs.readFileSync( | ||
| path.join(rootDir, "dist", "worker", "wrangler.json"), |
Contributor
There was a problem hiding this comment.
just a FYI that this could be simplified
Suggested change
| path.join(rootDir, "dist", "worker", "wrangler.json"), | |
| path.join(rootDir, "dist/worker/wrangler.json"), |
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.
Fixes #11963
Infer
upload_source_mapssetting in the output Worker config from thebuild.sourcemapsetting in the Vite config.If build.sourcemap is enabled for a Worker environment, as in the following example,
"upload_source_maps": truewill now automatically be added to the outputwrangler.jsonfile.This removes the need to additionally specify the
upload_source_mapsproperty in the input Worker config.Note that if
upload_source_mapsis set in the input Worker config, this value will take precedence.This makes it possible to generate source maps without uploading them.
upload_source_mapsinference in Vite plugin cloudflare-docs#28146A picture of a cute animal (not mandatory, but encouraged)