Closed germain-gg closed 6 years ago
Thanks for the changes, Germain. For others taking a look, I installed using npm i --save-dev https://github.com/gsouquet/webpack-stream.git
and it resolved the issues I was seeing.
I hope @shama has a few cycles to spare to move this pull request forward.
The tests are likely failing because webpack-stream
needs updates in order to work with webpack 4, hence the normal dependency. I think I've mentioned it before in this project's issue board but peer dependencies are flawed and don't solve this issue.
If you really want to use your own version of webpack without waiting for it to be updated, then as shown in the docs, you can supply your own version of webpack as a second parameter:
const gulp = require('gulp');
const webpack = require('webpack');
const gulpWebpack = require('webpack-stream');
gulp.task('default', function() {
return gulp.src('src/entry.js')
.pipe(gulpWebpack({}, webpack))
.pipe(gulp.dest('dist/'));
});
Thanks for your update on that! 👍 Do you remember why peer dependencies are flawed by any chance? Otherwise i'll try to dig in the issues board
as shown in the docs, you can supply your own version of webpack as a second parameter
For what it's worth, though others reported this working in #180, I had copied the exact code from the README and tried passing in the latest webpack module and it seemed to ignore what I passed in and continued to use the older webpack.
The current implementation of
webpack-stream
forces developers to use thewebpack
version defined in thepackage.json
. Realistically we can assume that this package will always be used in a context where its host havewebpack
as dependency. This is why we can leverage the npm peer dependencies.I added the package
install-peer-dependencies
so that we can run the unit tests even if the project is not embedded anywhere. I also decided not to add that to thepostinstall
npm hook because it is intended for development purposes only.Those change bring up another problems though. The unit tests are very version dependant and about 80% of them are failing if we try running this with webpack 4.
Not too sure what to do with those, I'd be happy to listen to your recommendation and update accordingly.