fix(config): exclude aliased mock packages from optimizeDeps in browser mode - #1816
yamachi4416 wants to merge 1 commit into
Conversation
commit: |
|
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: Your plan provides up to 2 included reviews per hour; 1 remains 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 mode now avoids pre-bundling the mock-aliased Vue DevTools packages, preventing browser-test dependency resolution failures without changing public APIs or non-browser behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
🔗 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