feat(build): support custom framework preview/deploy commands#4293
feat(build): support custom framework preview/deploy commands#4293danielroe wants to merge 2 commits into
Conversation
|
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: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR extends the Nitro framework information type with optional ChangesFramework-aware build command hints
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/build/vite/prod.ts`:
- Around line 123-124: The current fallback for previewCommand (const
previewCommand) uses "npx nitro preview" and may not work for plain Vite
outputs; verify whether the nitro CLI exposes a compatible preview subcommand
and supports Vite .output, and if it does not, change the fallback used in the
previewCommand assignment (and the nitro.logger.success message) to "npx vite
preview" or implement logic to pick "npx nitro preview" only when nitro supports
preview (e.g., feature-detect the CLI or an option on the build result); update
the previewCommand initialization and the nitro.logger.success call accordingly
so plain Vite users are pointed at a working preview command.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ff81c96a-200e-4324-ab3d-5374fb3fb484
📒 Files selected for processing (3)
src/build/rolldown/prod.tssrc/build/vite/prod.tssrc/types/nitro.ts
🔗 Linked issue
❓ Type of change
📚 Description
testing vite environment api with nuxt, I was surprised to see this printed out at the end of the build:
I think it makes sense for frameworks with their own CLI to provide a custom preview/deploy command rather than hard-coding it to
vite preview, ornitro deploy.📝 Checklist