Skip to content

Instantly share code, notes, and snippets.

@christopher4lis
Last active August 12, 2022 13:55
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save christopher4lis/3358d92395d686375c50f7ebb218f1dc to your computer and use it in GitHub Desktop.
Save christopher4lis/3358d92395d686375c50f7ebb218f1dc to your computer and use it in GitHub Desktop.
Webpack Dev Server + Browser Sync Config
new BrowserSyncPlugin({
host: 'localhost',
port: 3001,
proxy: 'http://localhost:8081/',
files: [{
match: [
'**/*.hbs'
],
fn: function(event, file) {
if (event === "change") {
const bs = require('browser-sync').get('bs-webpack-plugin');
bs.reload();
}
}
}]
}, {
reload: false
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment