shakyShane/bs-fullscreen-message

Plugin dosn't work

Opened this issue · 0 comments

wzup commented

Fullscreen error is never sent to browser.

Config:

let historyApiFallback = require( 'connect-history-api-fallback' );
let webpack = require( 'webpack' );
let webpackDevMiddleware = require( 'webpack-dev-middleware' );
let webpackHotMiddleware = require( 'webpack-hot-middleware' );
let config = require( '../webpack.conf' );
const bs = require( "browser-sync" ).create( appName );
const bundler = webpack( config );

bundler.plugin( 'done', function( stats ) {

    return bs.sockets.emit( 'fullscreen:message', {
        title: "Webpack Done",
        body: 'Webpack Done Body message',
        timeout: 1000
    } );
} );

bs.init( {
    port: 3020,
    ui: {
        port: 3021,
    },
    server: true,
    middleware: [
        historyApiFallback(),
        webpackDevMiddleware( bundler, {
            publicPath: config.output.publicPath,
            noInfo: false,
            quiet: false,
            stats: {
                assets: true,
                colors: true,
                version: false,
                hash: true,
                timings: true,
                chunks: true,
                chunkModules: true
            },
        } ),
        webpackHotMiddleware( bundler )
    ],
    plugins: [ 'bs-fullscreen-message' ],
    serveStatic: [ './public' ],
    files: [ './public/css/*.css', './index.html' ],
}, ( props ) => {
    console.log( 'server started' );
} );