You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Workers] Recommend source maps across Worker examples - #34185
Recommend source maps for every JavaScript and TypeScript Worker so production errors and stack traces point to the original source. Add upload_source_maps: true to complete Worker configuration examples across product guides and reusable snippets, and connect the recommendation to errors, logs, and Issues.
{
"upload_source_maps": true
}
Explain that framework builds must generate external server source maps, show Vite configuration, document opt-outs, and keep server maps out of public assets. Correct the version-upload guidance to use wrangler versions upload.
Without this — debugging in production is harder. You don't get stack traces for exceptions that map back to source code. And your production profiles are harder to reason about, since they don't point back to the right line numbers in source code.
Fix the following review findings in PR #34185 (https://github.com/cloudflare/cloudflare-docs/pull/34185).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit because the next review reads PR comments.
## Code Review- C-00f99393 | src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx:164 | Comment describing `main` is now attached to `upload_source_maps`
The comment `// or some other location if you moved the script out of the static asset directory` explains the value of the `main` field that previously carried it, but this PR moved it onto the new `upload_source_maps` line. As written, the example implies the comment describes `upload_source_maps`, which is misleading; the comment should stay with `main`.
```txt "upload_source_maps": true, // or some other location if you moved the script out of the static asset directory```## Style Guide- S-04b7a797 | src/content/docs/workers/vite-plugin/get-started.mdx:78 | Directional word `above` in prose
The added prose uses the directional word `above` ("in the Vite configuration above"). Per the style guide, directional words must be replaced with a direct reference by name or link.
- S-0e3b27f2 | src/content/docs/workers/vite-plugin/get-started.mdx:78 | `see [link]` should be `refer to [link]`
The added prose uses `see [Vite Environments]` before a link. The style guide requires `refer to [Page Title]` phrasing instead of `see [link]`.
- S-1f7085b0 | src/content/docs/workers/vite-plugin/get-started.mdx:57 | Missing serial comma before final `or`
The list `` `wrangler.jsonc`, `wrangler.json` or `wrangler.toml` `` has three items joined by `or` with no comma before the final conjunction; the serial comma is required.
Code Review
src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx:164 · Comment describing main is now attached to upload_source_maps
The comment // or some other location if you moved the script out of the static asset directory explains the value of the main field that previously carried it, but this PR moved it onto the new upload_source_maps line. As written, the example implies the comment describes upload_source_maps, which is misleading; the comment should stay with main.
"upload_source_maps": true, // or some other location if you moved the script out of the static asset directory
Style Guide
src/content/docs/workers/vite-plugin/get-started.mdx:78 · Directional word above in prose
The added prose uses the directional word above ("in the Vite configuration above"). Per the style guide, directional words must be replaced with a direct reference by name or link.
src/content/docs/workers/vite-plugin/get-started.mdx:78 · see [link] should be refer to [link]
The added prose uses see [Vite Environments] before a link. The style guide requires refer to [Page Title] phrasing instead of see [link].
src/content/docs/workers/vite-plugin/get-started.mdx:57 · Missing serial comma before final or
The list `wrangler.jsonc`, `wrangler.json` or `wrangler.toml` has three items joined by or with no comma before the final conjunction; the serial comma is required.
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
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.
Recommend source maps for every JavaScript and TypeScript Worker so production errors and stack traces point to the original source. Add
upload_source_maps: trueto complete Worker configuration examples across product guides and reusable snippets, and connect the recommendation to errors, logs, and Issues.{ "upload_source_maps": true }Explain that framework builds must generate external server source maps, show Vite configuration, document opt-outs, and keep server maps out of public assets. Correct the version-upload guidance to use
wrangler versions upload.refs https://developers.cloudflare.com/workers/observability/profiling-in-production/ and https://blog.cloudflare.com/workers-on-demand-profiling/
Without this — debugging in production is harder. You don't get stack traces for exceptions that map back to source code. And your production profiles are harder to reason about, since they don't point back to the right line numbers in source code.
Related changes: SDK defaults and framework templates.