feat(project): replace livereload with browser-sync #2073
Merged
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.
generator-angular-fullstack$ npm test
)Closes #1955.
As the title says, this commit replaces the
livereload
functionality with browser-sync. The greatest benefit this gives is the possibility to get multiple windows on multiple devices to update for each change. Additionally granting scroll, click and form input mirroring. Thus essentially enabling the testing of multiple devices at a time.The only controversial change I can think of is likely the switch to a separate port when in development while the earlier default port is used to proxy both static content and the API.
That new port is hard-coded in the config file (next to the
devPort
) to the browser-sync default of 3000. Figure two changes could me made:devPort
to the browser-sync-portAn alternative implementation would make use of either the
browser-sync-spa
plugin or directly use its dependencyconnect-history-api-fallback
. I opted out from that strategy because I felt this proxy-reliant solution was more straight-forward and more suitable given our fullstack + webpack project.