Skip to content

feat(project): replace livereload with browser-sync #2073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2016
Merged

Conversation

Koslun
Copy link
Member

@Koslun Koslun commented Jul 19, 2016

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:

  1. Add some kind of customization similar to devPort to the browser-sync-port
  2. Change the browser-sync port to the generator's old default of 9000, though that would also require changing the server development port to some other port.

An alternative implementation would make use of either the browser-sync-spa plugin or directly use its dependency connect-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.

@Awk34 Awk34 merged commit e0ab407 into canary Jul 20, 2016
@Koslun Koslun mentioned this pull request Jul 21, 2016
1 task
@Awk34 Awk34 deleted the browser-sync branch August 4, 2016 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants