Skip to content

presets(vercel): enable shouldAddSourcemapSupport when sourcemap is enabled#4232

Merged
pi0 merged 2 commits intomainfrom
fix/vercel-sourcemaps-vcconfig-flag
Apr 29, 2026
Merged

presets(vercel): enable shouldAddSourcemapSupport when sourcemap is enabled#4232
pi0 merged 2 commits intomainfrom
fix/vercel-sourcemaps-vcconfig-flag

Conversation

@RihanArfan
Copy link
Copy Markdown
Member

@RihanArfan RihanArfan commented Apr 28, 2026

related to #4232

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Enables runtime sourcemap support on Vercel when generation of sourcemap is enabled

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@RihanArfan RihanArfan requested a review from pi0 as a code owner April 28, 2026 16:16
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nitro.build Ready Ready Preview, Comment Apr 29, 2026 0:39am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

The Vercel serverless function base configuration now conditionally includes shouldAddSourcemapSupport: true when nitro.options.sourcemap is enabled; tests updated to expect this field. No other config fields or user overrides were changed.

Changes

Cohort / File(s) Summary
Vercel Configuration
src/presets/vercel/utils.ts
Add conditional shouldAddSourcemapSupport: true to the generated base .vc-config.json when nitro.options.sourcemap is set.
Tests
test/presets/vercel.test.ts
Update test fixture to expect shouldAddSourcemapSupport: true in functions/__server.func/.vc-config.json.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, explaining that the enhancement enables runtime sourcemap support on Vercel when sourcemap generation is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title follows conventional commits format with a scope (vercel) and clear description of the enhancement to enable sourcemap support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/vercel-sourcemaps-vcconfig-flag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pi0 pi0 changed the title feat(vercel): enable shouldAddSourcemapSupport when sourcemap is created preset(vercel): enable shouldAddSourcemapSupport when sourcemap is enabled Apr 29, 2026
@pi0
Copy link
Copy Markdown
Member

pi0 commented Apr 29, 2026

@RihanArfan can you please update snapshot

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 29, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4232

commit: f708b82

@pi0 pi0 changed the title preset(vercel): enable shouldAddSourcemapSupport when sourcemap is enabled presets(vercel): enable shouldAddSourcemapSupport when sourcemap is enabled Apr 29, 2026
@pi0 pi0 merged commit a9305f0 into main Apr 29, 2026
14 checks passed
@pi0 pi0 deleted the fix/vercel-sourcemaps-vcconfig-flag branch April 29, 2026 13:05
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