Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(plugin-vite): support server host in renderer#4030

Open
ChenJiaH wants to merge 2 commits intoelectron:main from
ChenJiaH:feat/support-server-host
Open

feat(plugin-vite): support server host in renderer #4030
ChenJiaH wants to merge 2 commits intoelectron:main from
ChenJiaH:feat/support-server-host

Conversation

@ChenJiaH
Copy link

@ChenJiaH ChenJiaH commented Oct 13, 2025

Previously, the Electron Forge Vite plugin hardcoded the development server URL to use localhost when exposing the renderer process URL to the main process. This limitation prevented developers from configuring custom host addresses for the Vite development server, which is essential for scenarios such as:

  • Network debugging across different devices
  • Docker container development environments
  • Custom network configurations
  • Remote development setups

@ChenJiaH ChenJiaH requested a review from a team as a code owner October 13, 2025 08:56
Copy link
Member

@BlackHole1 BlackHole1 left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM, just have a small nit

Comment on lines +88 to +89
const configHost = server.config.server?.host
const devHost = typeof configHost === 'string' ? configHost : 'localhost'
Copy link
Member

@BlackHole1 BlackHole1 Oct 30, 2025

Choose a reason for hiding this comment

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

Suggested change
const configHost = server.config.server?.host
const devHost = typeof configHost === 'string' ? configHost : 'localhost'
const devHost = server.config.server?.host ?? 'localhost'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@BlackHole1 BlackHole1 BlackHole1 approved these changes

@caoxiemeihao caoxiemeihao Awaiting requested review from caoxiemeihao

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Comments

AltStyle によって変換されたページ (->オリジナル) /