Skip to content

fix(core): skip devtools injection for SSR builds#291

Merged
antfu merged 1 commit intomainfrom
antfu/skip-inject-on-build
Apr 16, 2026
Merged

fix(core): skip devtools injection for SSR builds#291
antfu merged 1 commit intomainfrom
antfu/skip-inject-on-build

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented Apr 16, 2026

Description

Change the DevToolsInjection plugin's apply from a static 'serve' string to a function that also explicitly guards against SSR builds (!env.isSsrBuild). This makes the intent clear and future-proofs against SSR build scenarios.

Linked Issues

Additional context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 16, 2026

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@291

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@291

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@291

@vitejs/devtools-rpc

npm i https://pkg.pr.new/@vitejs/devtools-rpc@291

@vitejs/devtools-self-inspect

npm i https://pkg.pr.new/@vitejs/devtools-self-inspect@291

commit: 3b2b15f

@antfu antfu merged commit af23df7 into main Apr 16, 2026
9 checks passed
@antfu antfu deleted the antfu/skip-inject-on-build branch April 16, 2026 23:54
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.

1 participant