browser-sync-webpack-plugin icon indicating copy to clipboard operation
browser-sync-webpack-plugin copied to clipboard

Feature request: show complition errors via browserSync fullscreen message

Open dkrnl opened this issue 4 years ago • 1 comments

Hi! Thx for browser-sync-webpack-plugin!

I got an idea: show error overlay , when webpack done compliation with errors.

Оriginal code from browsersync recipes:

// pseodo code
bundler.plugin('done', function (stats) {
    if (stats.hasErrors() || stats.hasWarnings()) {
        return browserSync.sockets.emit('fullscreen:message', {
            title: "Webpack Error:",
            body:  stripAnsi(stats.toString()),
            timeout: 100000
        });
    }
    browserSync.reload();
});

Question: can i create pull request this new feature?

dkrnl avatar Feb 25 '21 11:02 dkrnl

hi @dkrnl

you're very welcome :)

to your question: yes, sounds like a nice idea and you surely can implement it and submit a PR. the code of the plugin is fairly simple, so i think it won't be problematic. however, we have no tests and i, personally, have no project to test against. so, please, test thoroughly yourself and paste some screenshots of the overlay.

cheers

Va1 avatar Feb 25 '21 14:02 Va1