Skip to content

fix(core): use virtual module instead of fs URL for client injection#388

Open
webfansplz wants to merge 1 commit into
mainfrom
hotfix-386
Open

fix(core): use virtual module instead of fs URL for client injection#388
webfansplz wants to merge 1 commit into
mainfrom
hotfix-386

Conversation

@webfansplz

Copy link
Copy Markdown
Member

Close #386

Copilot AI review requested due to automatic review settings June 30, 2026 13:13
@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/devtools@388
npm i https://pkg.pr.new/@vitejs/devtools-kit@388
npm i https://pkg.pr.new/@vitejs/devtools-rolldown@388
npm i https://pkg.pr.new/@vitejs/devtools-self-inspect@388

commit: d46c19e

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #386 by changing how the DevTools client injector is added to served HTML, aiming to avoid @fs-based URLs that break in Vite 8.1+ bundled (full-bundle) dev mode.

Changes:

  • Replaces <script type="module" src="/@fs/..."> HTML injection with an inline module script that imports a new virtual module (virtual:vite-devtools-injection).
  • Adds resolveId/load hooks to serve the injected virtual module, which then imports the actual client injector entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/src/node/plugins/injection.ts
Comment thread packages/core/src/node/plugins/injection.ts
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.

Do not use fs injection for bundled dev mode on Vite 8.1+

2 participants