perf(nuxi): do not bundle jiti - #1409
Conversation
commit: |
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe nuxi package declares Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@packages/nuxt-cli/src/utils/nuxt-config.ts`:
- Around line 44-48: Update the catch block around importConfigWithJiti to
normalize arbitrary thrown values before logging: use the Error message for
Error instances and String(error) otherwise, ensuring consola.warn never
displays undefined for non-Error failures.
- Around line 85-94: Update the dynamic import fallback around createJiti so it
only resolves jiti from rootDir when the original import failure indicates the
jiti package is missing. Re-throw all other load or dependency failures
unchanged, and preserve the existing missing-package hint and fallback import
path for the absent-module case.
🪄 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 Plus
Run ID: 38c3a208-6909-436a-a8c7-d2d4973f3502
📒 Files selected for processing (2)
packages/nuxi/package.jsonpackages/nuxt-cli/src/utils/nuxt-config.ts
f12dd85 to
b0a61e0
Compare
🔗 Linked issue
📚 Description
this makes
jitian optional peer dependency ofnuxi, so we use it if the project has it installed; otherwise we give a tip to install.(it's only used in
nuxi infocommand)