Skip to content

feat(create-vite): add option to scaffold Vite DevTools integration#22798

Open
tangyuan0821 wants to merge 3 commits into
vitejs:mainfrom
tangyuan0821:main
Open

feat(create-vite): add option to scaffold Vite DevTools integration#22798
tangyuan0821 wants to merge 3 commits into
vitejs:mainfrom
tangyuan0821:main

Conversation

@tangyuan0821

@tangyuan0821 tangyuan0821 commented Jun 28, 2026

Copy link
Copy Markdown

Add --devtools CLI flag and interactive prompt for vite-plugin-vue-devtools. Adds the dependency to package.json and registers the plugin in vite.config.

Vue templates only. The package hooks into Vue runtime internals. No generic equivalent exists.

Alternatives:

  • Generic devtools plugin: doesn't exist.
  • Always on: contradicts minimal default.
  • Other package names: issue listed vite-dev-tools as placeholder. The real package is vite-plugin-vue-devtools.

Off by default. Pass --devtools to enable.

close #22640

The --devtools flag was adding vite-plugin-vue-devtools to non-Vue templates (React, Svelte, etc.), contradicting its documented behavior.

Added isVueTemplate guard so the flag only takes effect when scaffolding Vue (vue / vue-ts) templates.
@sapphi-red sapphi-red added the feat: create-vite create-vite package label Jun 30, 2026
@sapphi-red

sapphi-red commented Jun 30, 2026

Copy link
Copy Markdown
Member

Why does this only add it for Vue? Converting to draft as it doesn't have any description about why this is the way and what alternatives were explored.

@sapphi-red sapphi-red marked this pull request as draft June 30, 2026 07:57
@tangyuan0821

Copy link
Copy Markdown
Author

vite-plugin-vue-devtools is Vue-specific — it hooks into Vue runtime internals. No framework-agnostic equivalent exists, so the option is scoped to Vue templates.

Updated the PR description with rationale and alternatives.

@tangyuan0821 tangyuan0821 marked this pull request as ready for review July 13, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: create-vite create-vite package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(create-vite): consider adding an option to scaffold Vite DevTools integration

2 participants