Skip to content

fix(cli)!: Remove default port for --live-reload#8376

Open
OS-pedrogustavobilro wants to merge 1 commit intonextfrom
breaking/remove-live-reload-default-port
Open

fix(cli)!: Remove default port for --live-reload#8376
OS-pedrogustavobilro wants to merge 1 commit intonextfrom
breaking/remove-live-reload-default-port

Conversation

@OS-pedrogustavobilro
Copy link
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro commented Mar 3, 2026

Description

This PR removes the default --port value for --live-reload. When adding the --https, we already opted out of having a default, and with this (breaking) change there's consistency.

With this PR, if no --port nor --http is specified, the url will be like so http://<host>; in other words, will run in the default port for http (80).

An alternative to this is to merge --host, --port, and --https CLI args into a single --url or --live-reload-url arg, that would directly override server.url config. I am inclined to open a separate PR for that and the team can decide which one is preferable.

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation

Rationale / Problems Fixed

Port '3000' isn't widely used for local servers, maybe it made sense once upon a time, but not anymore.

There has been confusion regarding the use of a default port for --live-reload (there's probably older links, but these should suffice to justify the change):

Since the port may change depending on what's the underlying stack used to setup live-reload, the framework shouldn't make assumptions on the port to use.

Tests or Reproductions

You can use any existing capacitor app to test, you just need to point to the local capacitor cli version from this PR's branch.

For reference, I used https://github.com/OS-pedrogustavobilro/capacitor-test-livereload

Screenshots / Media

Not relevant

Platforms Affected

  • Android
  • iOS
  • Web

Notes / Comments

N/A

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