Skip to content

fix(devtools): optimize @vue/devtools dependencies in dev#981

Merged
antfu merged 1 commit intomainfrom
fix/optimize_deps
Apr 8, 2026
Merged

fix(devtools): optimize @vue/devtools dependencies in dev#981
antfu merged 1 commit intomainfrom
fix/optimize_deps

Conversation

@huang-julien
Copy link
Copy Markdown
Member

🔗 Linked issue

fix #980

📚 Description

TRhis PR adds @vue/devtools dependencies in the optimizeDeps array of vite

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying nuxt-devtools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0310292
Status: ✅  Deploy successful!
Preview URL: https://f49068d9.nuxt-devtools.pages.dev
Branch Preview URL: https://fix-optimize-deps.nuxt-devtools.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9ded118f-8dfd-4d08-8c53-beca2e5dba11

📥 Commits

Reviewing files that changed from the base of the PR and between 4c594ce and 0310292.

📒 Files selected for processing (1)
  • packages/devtools/src/module-main.ts

📝 Walkthrough

Walkthrough

The change adds a development-mode-only Vite configuration adjustment to the devtools module. When nuxt.options.dev is true, the code ensures nuxt.options.vite.optimizeDeps exists and appends @vue/devtools-kit and @vue/devtools-core to its include list. This pre-optimizes these dependencies during development startup to prevent runtime discovery warnings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding @vue/devtools dependencies to Vite's optimizeDeps configuration during development.
Description check ✅ Passed The PR description relates to the changeset, explaining the addition of @vue/devtools dependencies to Vite's optimizeDeps array and linking to the associated issue.
Linked Issues check ✅ Passed The PR directly addresses issue #980 by implementing Vite dependency pre-optimization to prevent runtime dependency discovery warnings on first-run development starts.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped to adding @vue/devtools packages to Vite's optimizeDeps during development, with no additional unrelated modifications to the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/optimize_deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@antfu antfu merged commit 32563f0 into main Apr 8, 2026
5 checks passed
@antfu antfu deleted the fix/optimize_deps branch April 8, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vite discovered new dependencies at runtime

2 participants