Skip to content

fix(core)!: respect vite https config only for embedded client#273

Open
webfansplz wants to merge 1 commit intomainfrom
hotfix-https
Open

fix(core)!: respect vite https config only for embedded client#273
webfansplz wants to merge 1 commit intomainfrom
hotfix-https

Conversation

@webfansplz
Copy link
Copy Markdown
Member

Close #272

Copilot AI review requested due to automatic review settings March 31, 2026 13:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates WebSocket server configuration to allow selectively inheriting Vite’s server.https only when running as an embedded client (and explicitly disabling it for standalone/CLI usage), closing #272.

Changes:

  • Replaces hostWebSocket/portWebSocket with a structured websocket options object (including an https override).
  • Introduces resolveWebSocketHttps() to implement “inherit unless explicitly disabled” behavior.
  • Updates server/plugin/CLI integration points to pass the new websocket options and disable HTTPS inheritance where appropriate.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/core/src/node/ws.ts Introduces new websocket options shape and HTTPS resolution logic.
packages/core/src/node/plugins/server.ts Updates embedded server plugin to pass websocket.host (inherits Vite HTTPS).
packages/core/src/node/cli-commands.ts Updates CLI to pass websocket options and explicitly disable HTTPS inheritance.
packages/core/src/client/standalone/vite.config.ts Updates standalone client middleware setup to explicitly disable HTTPS inheritance.

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 31, 2026

Open in StackBlitz

@vitejs/devtools

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

@vitejs/devtools-kit

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

@vitejs/devtools-rolldown

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

@vitejs/devtools-rpc

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

@vitejs/devtools-self-inspect

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

commit: 1960376

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.

WebSocket connection fails when user's Vite config has server.https enabled

2 participants