Skip to content
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

Refresh not triggered automatically on mobile devices #29

Open
tinesoft opened this issue Dec 20, 2016 · 9 comments
Open

Refresh not triggered automatically on mobile devices #29

tinesoft opened this issue Dec 20, 2016 · 9 comments

Comments

@tinesoft
Copy link

Hi,

I'm using this browser-sync-webpack-plugin (along with gulp+webpack-dev-server) to run an Angular application built with Angular CLI.

The plugin config is the same as default:

module.exports = {
  // ... 
  plugins: [
    new BrowserSyncPlugin(
      // BrowserSync options 
      {
        // browse to http://localhost:3000/ during development 
        host: 'localhost',
        port: 3000,
        // proxy the Webpack Dev Server endpoint 
        // (which should be serving on http://localhost:3100/) 
        // through BrowserSync 
        proxy: 'http://localhost:3100/'
      },
      // plugin options 
      {
        // prevent BrowserSync from reloading the page 
        // and let Webpack Dev Server take care of this 
        reload: false
      }
    )
  ]
}

Almost everything works pretty well. BrowserSync proxies to webpack-dev-server, its features like scroll synchronization, CSS outlines, CSS grids, work great across browsers/devices (tested with Chrome, Chrome Android and Firefox).

The plugin DOES detect changes from webpack-dev-server, and refresh the page on PC browsers.

But the refresh is not triggered automatically on my mobile browser (Chrome Android v.57.0.2950.3).
even if the "Rebuilding..." message is correctly displayed.

Any ideas?

Thanks in advance

@Va1
Copy link
Owner

Va1 commented Jan 30, 2017

@tinesoft
hi!

sorry for the delayed reply.

as reloading works fine on PC and fails on mobile, i guess this is the browser-sync issue. but, if "Rebuilding..." is displayed, it becomes even more strange. did you try testing this on different phones (running iOS, for instance)?

cheers

@tinesoft
Copy link
Author

Hi @Va1,

Unfortunately i don't have any other mobile phones to test on, just my Android phone with Chrome...

@giftofjehovah
Copy link

hi @Va1 & @tinesoft,

I tried the same on my iphone. the same happens as well. its not hot reloading on mobile. and the state doesn't seems to sync as well?

@nmihaica
Copy link

Can confirm. AlsoRebuilding but no refresh.

@giftofjehovah
Copy link

@nmihaica I managed to get hot reloading to work on mobile, now just having trouble with onChange events on inputs not syncing.

@nmihaica
Copy link

nmihaica commented Mar 21, 2017

I dropped webpack-dev-server and returned back to Webpack inside Gulp to use it only to bundle assets. Traded HMR for smoothness of Gulp + BrowserSync.

@amndplz
Copy link

amndplz commented Jun 22, 2017

I changed reload: false to reload: true and it appears to work as intended.

@cmdillon
Copy link

hi! i also have the same issue. does anyone have a solution besides changing the "reload" option?

@poillic
Copy link

poillic commented Apr 6, 2018

Same issue for me, I need HMR for my css but I don't want to reload the browser because the page is relatively heavy (lots of pictures).

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

No branches or pull requests

7 participants