Skip to content

Replace browser-sync with new dev server #1305

Closed
@zachleat

Description

@zachleat
Member

As our fearless browser-sync dependency may not be maintained any longer, we may want to investigate possible replacements—as I’d rather not implement this functionality in Eleventy myself though that is a possible option.

via #1164 (comment)

If you’ve heard of a good alternative, please list it here!

Activity

added
needs-discussionPlease leave your opinion! This request is open for feedback from devs.
on Jul 7, 2020
cristianl

cristianl commented on Jul 8, 2020

@cristianl

I'd like to collaborate on this. I've wanted a lightweight alternative (famous last words) to browser-sync and livereload, but it seems pointless to cobble together something that doesn't integrate well with future projects and other tools. Eleventy would be an amazing stress test/launchpad for this 🤗

Ghost mode is the main selling point of browser-sync, but it seems to account for most of the dependencies, and also adds jank on some pages/devices.


I've seen a simpler but effective implementation (sapper I think?) using Server Sent Events instead of websockets.

DOM injection is really great for designing in the browser despite some edge cases. It makes for cool demo gifs too.

cristianl

cristianl commented on Jul 9, 2020

@cristianl

In the meantime, would a fork of the browsersync server package with dep bumps be acceptable?

Only yargs@15 needs a change to code (version() no longer accepts a function as its argument).

Tests: 466 passing / 18 pending (on current node 10, 12 and 14), same as before bumps

added a commit that references this issue on Jul 11, 2020
brycewray

brycewray commented on Jul 11, 2020

@brycewray

Thanks for the heads-up, @zachleat — have replaced browser-sync with svrx for my local testing builds, and am liking it quite a bit better already.

cj81499

cj81499 commented on Jul 17, 2020

@cj81499

One of my favorite browser-sync features is cross-browser synchronization (scroll/click in one window, and other windows opened to the same page will do the same).

I hope that if browser-sync is replaced, we can keep that functionality. It makes cross-browser testing (chrome/firefox/safari/etc) much easier.

brycewray

brycewray commented on Jul 17, 2020

@brycewray

One of my favorite browser-sync features is cross-browser synchronization (scroll/click in one window, and other windows opened to the same page will do the same).

I hope that if browser-sync is replaced, we can keep that functionality. It makes cross-browser testing (chrome/firefox/safari/etc) much easier.

That's the "ghost mode." I guess it's an to-each-his-own kind of thing. I found it creepy until I learned it was supposed to do that. 😄

sjml

sjml commented on Aug 4, 2020

@sjml

With browser-sync updating, are you still interested in replacing it? Given #841 and #843 being listed as part of the 1.0 release, is there anything else it's doing that you would prefer to keep? (Something like svrx seems to have more flexibility, for instance, while still being actively developed).

I definitely recognize the value in not breaking what is no longer broken, though...

rdmurphy

rdmurphy commented on Nov 26, 2020

@rdmurphy

👋 I was equally frustrated with browser-sync for similar reasons (but eternally grateful for all its years of service 🙏 ) and ended up creating mini-sync. It uses server-sent events instead of WebSockets to simplify messaging.

It's biggest flaw is it lacks the auto-injection into HTML files that browser-sync has. I can work around that in my uses because they often have a JS build step as well 😅 , but if anyone has any suggestions regarding that or whether it'd work for eleventy, let me know!

brycewray

brycewray commented on Jan 3, 2021

@brycewray

Re the svrx pacakge, note the following for now: svrxjs/svrx#191

pinned this issue on Feb 26, 2022

17 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

breaking-changeThis will have to be included with a major version as it breaks backwards compatibility.

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @zachleat@cristianl@TigersWay@rdmurphy@sjml

      Issue actions

        Replace browser-sync with new dev server · Issue #1305 · 11ty/eleventy