Overlay a fullscreen message to all browsers
Useful for showing errors from webpack/browserify/gulp etc
npm i browser-sync bs-fullscreen-message
var browserSync = require('browser-sync').create();
browserSync.init({
server: 'test/fixtures',
plugins: ['bs-fullscreen-message']
});
// Emit an event to connected clients
setTimeout(function () {
browserSync.sockets.emit('fullscreen:message', {
title: "Hello from Example",
body: '10 seconds have elapsed!'
});
}, 5000);
Checkout the example here https://github.com/BrowserSync/recipes/blob/master/recipes/webpack.babel/app.js