does not work with webpack 5
gianlucalarizza opened this issue ยท 11 comments
Explain the problem
Dear, this very useful plugin does not work with webpack 5. Unfortunately. Thank you
Expected Behaviour
Actual Behaviour
Steps to reproduce
Provide your webpack config
Provide your Environment details
-
Node version:12.16.3
-
Operating System:
-
webpack version: 5
-
parallel-webpack version: 2.6.0
๐
any updates?
I gave this a try and webpack 5 worked as expected with parallel-webpack. Just make sure to follow the migration guide and update all webpack-related dependencies.
https://webpack.js.org/migrate/5/
Doesn't work with stats because presetToOptions should be replaced with compilation.createStatsOptions
This only occurs if you're using a string reference to your stats.
e.g. stats: "minimal"
.
If you change this to
stats: {
preset: "minimal"
}
It will build with webpack 5. ๐
This only occurs if you're using a string reference to your stats.
e.g.stats: "minimal"
.If you change this to
stats: { preset: "minimal" }
It will build with webpack 5. ๐
It will not, obviously. Webpack stats config doesn't have preset
key and leaving stats
with minimal
value still leads to that presetToOptions error.
Doesn't work with stats because presetToOptions should be replaced with compilation.createStatsOptions
But you can't, because presetToOptions
was static method of Stats
class and createStatsOptions
is not static method in Compilation
class.
@Defite I've been reviewing the Webpack config and it seems the config @culshaw has shared is valid. stats
accepts a boolean, a string or a StatsOptions
object and this type can has an optional preset
key as you can see in the type definition file from webpack repo.
I've tried this config using parallel-webpack
and it has worked as expected.
Solved by changing stats
from 'none'
to false
.
Is this project still active? I see that the last commit was almost 1-1/2 years ago.
If this project is in fact defunct, what's the replacement?
Is this project still active? I see that the last commit was almost 1-1/2 years ago.
If this project is in fact defunct, what's the replacement?
None of the original authors still work at trivago. With all of the improvements in Webpack through the last years, the advantage of parallel builds has been reduced to the point where trivago stopped using this project entirely.
I'd recommend using Webpack directly. In most cases that should be good enough.