fix(nitro): vercel function rules - preserve relative symlinks - #4490
fix(nitro): vercel function rules - preserve relative symlinks#4490AndrewBarba wants to merge 1 commit into
Conversation
Signed-off-by: Andrew Barba <barba@hey.com>
|
@AndrewBarba is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Vercel preset now preserves symlink targets when copying custom function directories. The web preset test compares the ChangesVercel symlink preservation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
commit: |
Summary
functionRulescopies the traced server functionContext
nf3 emits relative links from package locations into
node_modules/.nf3. Node’sfs.cpresolves those links by default, so copying__server.funcinto a route-specific function rewrites them to absolute paths in the temporary build directory. Once that directory is removed, the deployed function contains dangling dependency links.Using
verbatimSymlinks: truekeeps the traced dependency graph self-contained in each copied function directory.Related downstream report and workaround: vercel/eve#1279
Testing
pnpm fmtpnpm typecheckpnpm vitest run test/presets/vercel.test.ts— 139 passed, 2 skipped, 2 todoTZ=UTC pnpm test; the Rollup run reached 1,025 passing tests and stopped on an unrelated Vite HMR assertion receiving two identicalfull-reloadevents instead of one