feat: Add liveReload#1407
Open
matz3 wants to merge 3 commits into
Open
Conversation
Member
Author
|
To be decided: Should clients try to reconnect to the server, e.g. in case it has been restarted? This is currently not implemented, but I think it should be added. |
Member
Author
This has now been implemented. |
ff657e6 to
409ab00
Compare
d3xter666
reviewed
Jun 9, 2026
RandomByte
requested changes
Jun 9, 2026
RandomByte
requested changes
Jun 9, 2026
flovogt
reviewed
Jun 12, 2026
KlattG
requested changes
Jun 12, 2026
KlattG
previously approved these changes
Jun 15, 2026
59235c4 to
4ae71d9
Compare
flovogt
previously requested changes
Jun 16, 2026
Adds optional live reload support to the server: - New `serveLiveReloadClient` middleware serves the client at `/.ui5/liveReload/client.js`. - The `serveResources` middleware injects the client script tag into HTML responses when `liveReload` is enabled. - A WebSocket server attaches to the HTTP server and notifies connected clients when the BuildServer emits a `sourcesChanged` event. The feature is opt-in via the new `liveReload` option to `serve()` and defaults to `false`. JIRA: CPOUI5FOUNDATION-1224
- Add new `server.settings.liveReload` boolean option to the project configuration schema, available with specVersion 5.0 and higher. - BuildServer now emits a debounced `sourcesChanged` event (100ms debounce) whenever watched source files change, so a burst of changes results in a single notification. JIRA: CPOUI5FOUNDATION-1224
- Add new `--live-reload` CLI flag (defaults to true) for the `ui5 serve` command. Pass `--no-live-reload` to disable it. - The flag overrides the `server.settings.liveReload` setting in the project's `ui5.yaml`. - When neither the CLI flag nor the configuration sets a value, live reload is enabled by default. JIRA: CPOUI5FOUNDATION-1224
Member
|
PM Review: LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live reload automatically refreshes the browser whenever you change a source file in your project — no manual reload needed. This shortens the edit/test cycle during development.
JIRA: CPOUI5FOUNDATION-1224