Closed romehu2 closed 2 years ago
Yes same issue for me
I found the issue with Webpack 5 output. In the afterEmit hook on webpack 5 the file does not have the .emitted property.
if (compilation.assets[outname].emitted) { var file = prepareFile(fs, compiler, outname); self.queue(file); }
If I have time I'll make a pull request
*** Edit : turns out I was using v 4 not v 7 which fixes webpack 5 issue
@cocoviper, what exactly fixes the webpack 5 issue? What are you referring to that you used v4 instead of v7?
Ah, webpack-stream version 7, of course. Can confirm this issue is fixed with webpack-stream v7. And v6.
I'm using gulp and webpack-stream to build my react project into one .js file and I would like to break it down into multiple .js files. I specifically want to use the new webpack-5 entry options "input" and "dependOn" but I have discovered that using webpack-5 results in no output being generated.
Here is a minimal example of a gulpfile.js that recreates the issue. (I chose to have the webpack options in the gulp file and use lodash.clonedeep, instead of having a webpack.config.js file.) Note the optional 'webpack' constant being passed into webpackStream in the task's 'return' statement.
At the CLI I make sure webpack-4 is installed (version 4.46.0), and then run the gulp file:
In File Explorer (Windows 10 x64) I see the file 'bundle.js' in the dist/ folder as expected. I delete the file, install webpack-5 (5.48.0) and rerun the gulp file:
But now 'bundle.js' is not in the dist/ folder. It appears to have been created in memory only. I have also used the webpack 'entry' option but however I set it up, webpack-4 creates actual output while webpack-5 creates nothing.