[create-cloudflare] Enable upload_source_maps by default for new projects#12741
Draft
[create-cloudflare] Enable upload_source_maps by default for new projects#12741
Conversation
…ects Add upload_source_maps: true to the central updateWranglerConfig function so all C3 templates get source maps enabled without needing per-template changes. Skipped for Python projects. Co-Authored-By: smacleod <samuel@macleod.space>
🦋 Changeset detectedLatest commit: c5dc447 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
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
✅ All changesets look good |
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: |
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.
Supersedes #11726.
Instead of adding
upload_source_maps: trueto each of the 43 individual templatewrangler.jsoncfiles, this sets it centrally in theupdateWranglerConfigfunction — the same place that already setsname,compatibility_date,observability, andnodejs_compatfor all C3 templates.Like
nodejs_compat,upload_source_mapsis skipped for Python projects.Key review points
??=is used (won't override if already set). For JSON configs,appendJSONProperty(which callsassign) is used (will override). This matches the existing pattern forobservabilityvsnodejs_compatbut is worth verifying is intentional.upload_source_mapsis grouped withnodejs_compatinside thelang !== "python"guard. The original PR Set upload_source_maps to true for all C3 templates #11726 also removed it from Python templates explicitly.Link to Devin session: https://app.devin.ai/sessions/9aa9987751da4a5b8ed3cf97a28996f5
Devin PR requested by @penalosa