shama / webpack-stream

:tropical_drink: Run webpack through a stream interface
MIT License
1.39k stars 122 forks source link

Is it possible to prevent webpack from clearing the console output? #150

Closed wujekbogdan closed 6 years ago

wujekbogdan commented 7 years ago

Hey,

I have set up Gulp 4.x + Webpack 2.

This is how I did it:

import webpackStream from 'webpack-stream';
import webpack2 from 'webpack';
import webpackConfig from './webpack.config.js';

const compileJs = ({ watch = false }) => {
    const config = Object.assign({
        watch,
    }, {}, webpackConfig);

    return gulp.src('./src/js/app.js')
        .pipe(webpackStream(config, webpack2))
        .pipe(gulp.dest('dist/'));
};

gulp.task('js:build', (done) => {
    compileJs({
        watch: false
    });
    done();
});

gulp.task('js:watch', (done) => {
    compileJs({
        watch: true
    });
    done();
});

I use Webpack just to compile ES6, for everything else I use Gulp.

It works fine, but I have a little problem. Webpack clears the Gulp's console output. Is there any way to force Webpack not to clear the console?

wujekbogdan commented 6 years ago

It seems that's no longer an issue. I'm using Gulp 4.0.0 stable now + Webpack 4.8.3 and it works fine. It was fine also with Webpack 3.4.1.