Skip to content

docs(cli): Better descriptions for live-reload parameters#8373

Merged
OS-pedrogustavobilro merged 2 commits intomainfrom
docs/cli-live-reload-args
Mar 3, 2026
Merged

docs(cli): Better descriptions for live-reload parameters#8373
OS-pedrogustavobilro merged 2 commits intomainfrom
docs/cli-live-reload-args

Conversation

@OS-pedrogustavobilro
Copy link
Contributor

Alternative PR to #8370

I had not realised that the --live-reload option overrides the server.url CapacitorConfig on purpose - In fact, the purpose of this property is really to allow to point to a certain live-reload server in the CLI, without having to set it in Capacitor Config (e.g. to avoid accidentally deploying that URL to production).

The description of the CLI option however was not the best, as it indicated "Enable Live Reload", when it fact it doesn't really do that. You can set server.url in Capacitor Config, and run cap run without --live-reload, and live reload should still work.

Therefore, in this PR I update the descriptions of the live reload CLI options to better reflect what they actually do.

FYI @aolsenjazz

@OS-pedrogustavobilro OS-pedrogustavobilro requested review from a team and jcesarmobile March 3, 2026 14:20
Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

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

rather than "live-reload server", I would say "live-reload url", since this doesn't really have any effect in the server, the server needs to be started before running the cap run command to know the hostname/port and the server is not provided by Capacitor.

Also, instead of "Change default" I think it should say "Configure", as at least for --port there is no default value if using --https, and as I commented on the PR that added that configuration, we should not really have a default port value since it's not really helpful as most apps not use 3000 this days, or maybe set it to 5173 since it's the vite default port and most tooling/apps are moving to vite, but still I would prefer no default.

@OS-pedrogustavobilro
Copy link
Contributor Author

OS-pedrogustavobilro commented Mar 3, 2026

rather than "live-reload server", I would say "live-reload url", since this doesn't really have any effect in the server

Yeah that's better, I was unsure if you meant it for host and port or live-reload, but I updated for all of them.

Also, instead of "Change default" I think it should say "Configure"

Yeah that's also better, updated it.

we should not really have a default port value

I was thinking of opening a PR to next soon to make that (breaking) change.

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

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

Looks good

note that once it's published, it should also be updated in https://capacitorjs.com/docs/cli/commands/run

Existing values there as slightly different from what the CLI was showing before this change, but I think the new texts are better.

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.

2 participants