fix(vite): allow providing the vite package path - #4637
Conversation
Frameworks running Vite programmatically can pass their own `vite` with the `vite.path` option, so the dev module runner matches the running instance (in a monorepo, another version can be hoisted next to the app). resolves #4636
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughNitro adds ChangesVite package resolution
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No confirmed issue remains; the change is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue Full details: Docstring CoverageExplanation Docstring coverage is 58.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 10 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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: |
Resolves #4636
Nitro resolves
vitefrom the project root. When a framework runs Vite programmatically in a monorepo where anotherviteversion is hoisted next to the app (Vite 7 at the root, Vite 8 in the framework), the dev worker ends up with the wrongvite/module-runnerand every request fails withMissing field moduleType.This adds a
vite.pathoption to point Nitro at thevitepackage that is actually running:Nitro also warns in dev when the
viteit resolved differs from the running one, and points at this option.🤖 Generated with AI assistant