fix(config): exclude aliased mock packages from optimizeDeps in browser mode - #1816
Conversation
commit: |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 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 (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughWhen Vitest 5+ browser mode is enabled, Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to Vitest 5+ browser runs now exclude both Vue DevTools packages without replacing configured exclusions. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
src/config.tsParsing error: Unexpected token { 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 |
🔗 Linked issue
📚 Description
When packages using dependencies aliased to mocks are added to
optimizeDeps.include(followingnuxt devoptimize hint), it triggers runtime re-bundling and causes errors in vitest5 browser mode. (this occurs when vite cache is not present, such as in ci).Reproduction
before: https://stackblitz.com/edit/nuxt-test-utils-pr-1816-before?file=package.json
after: https://stackblitz.com/edit/nuxt-test-utils-pr-1816-after?file=package.json