Closed ppozniak closed 5 years ago
Finally found a good solution to webpack 4
Doesn't work
const { src, dest } = require('gulp');
const webpack = require('webpack-stream');
const webpackTask = () => {
return src('src/entry.js')
.pipe(webpack())
.pipe(dest('dist/'));
};
Doesn't work.
const webpackTask = (done) => {
src('src/entry.js')
.pipe(webpack());
.pipe(dest('dist/'));
done();
};
Works!
const webpackTask = (done) => {
src('src/entry.js')
.pipe(webpack());
.pipe(dest('dist/'))
.on('end', done);
};
The issue was caused by uglify plugin and has nothing to do with webpack stream, sorry.
I'm getting the same issue and the suggested workaround does not work for me.
Is there a way I can see more information about the error @ppozniak ? I'm not sure what to report on the uglify plugin issue tracker.
Is this supposed to work with new gulp 4.0? I'm getting this error on tasks that use webpack-stream
One of my settings:
I've also tried providing the
callback
but that doesn't change anything.Any ideas?