Closed flurinduerst closed 6 years ago
I'm seeing exactly the same issue - I can work around it for css and js by skipping the proxy with the serverStatic option:
gulp.task('browser-sync', ['sass'], function() {
browserSync.init({
proxy: "http://myserver.local",
serveStatic: [{
route: ['/_production'],
dir: '_production'
}],
});
});
But when I change page, there's a consistent 5 second latency on each request. Tested on two different machines.
Found out it only affects the .local
domain. Changing it (to .vm
in my case, others work as well) fixed it.
Replacing .local
by .vm
solved my problem too.
Awesome! That did the trick although I'm not sure I understand why !!!
*.local
seems to be shared with Bonjour on Macs, which leads to the experienced slowness (on OSX at least).
Yes, also worked for me. I was working an a WordPress Theme. On Local FlyWheel I had to change the Site Domain from Mysite.local to Mysite.vm. And also had to change in my settings.js in my theme folder to this :
exports.urlToPreview = 'http://Mysite.vm/';
Thanks a lot, reloading from 6-7 sec into very fast!
Issue details
When accessing
localhost:3000
it takes around 5s to load the page. This means that every time I save changes to (for example) my .scss files, it takes 5s until I see the changes in the browser. Watching the network tab, I can see that there's a TTFB of around 5s. When accessing my local domain wpdev.local the page takes the assumed 0.3s to load. The problem only occurs when accessing localhost:3000Network Tab Screenshot: https://imgur.com/a/7LPDS
Steps to reproduce/test case
Setting up a local environment using scotchbox (vagrant/virtualbox) with the WPSeed WordPress starter theme.
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
gulp-output at CLI
gulpfile.js
package.json
hostsfile