Skip to content

Instantly share code, notes, and snippets.

@rugor
Created August 21, 2015 17:01
Show Gist options
  • Save rugor/614ab0e058ced2a58980 to your computer and use it in GitHub Desktop.
Save rugor/614ab0e058ced2a58980 to your computer and use it in GitHub Desktop.
Text: BrowserSync Settings for Vagrant Reload issue
// browser-sync options
browsersync: {
files: [build+'/**', '!'+build+'/**.map']
, notify: true
, open: true
//, port: 3000 // Port number for the live version of the site; default: 3000
//, proxy: 'test.dev' // Using a proxy instead of the built-in server as we have server-side rendering to do via WordPress
, watchOptions: {
debounceDelay: 2000 // Delay for events called in succession for the same file/event
}
}
// terminal output
[BS] Copy the following snippet into your website, just before the closing </body> tag
<script type='text/javascript' id="__bs_script__">//<![CDATA[
document.write("<script async src='http://HOST:3000/browser-sync/browser-sync-client.2.8.2.js'><\/script>".replace("HOST", location.hostname));
//]]></script>
[BS] Access URLs:
--------------------------------------
UI: http://localhost:3001
--------------------------------------
UI External: http://192.168.1.138:3001
--------------------------------------
// ^ notice no normal url/port suggestion from browser-sync. visiting the ui, no current connections are listed
// suggested script tag is included in the footer of the page, but script does not load
// when reloading the page via browser refresh, changes appear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment