Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

does not work with webpack 5 #107

Open
gianlucalarizza opened this issue Oct 13, 2020 · 11 comments
Open

does not work with webpack 5 #107

gianlucalarizza opened this issue Oct 13, 2020 · 11 comments

Comments

@gianlucalarizza
Copy link

gianlucalarizza commented Oct 13, 2020

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

@GiancarlosIO
Copy link

👀

@zhongzhong0505
Copy link

any updates?

@lfalke
Copy link

lfalke commented Dec 28, 2020

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/

@Derbdale
Copy link

Derbdale commented Jan 4, 2021

Doesn't work with stats because presetToOptions should be replaced with compilation.createStatsOptions

@culshaw
Copy link

culshaw commented Mar 15, 2021

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. 🎉

@Defite
Copy link

Defite commented Jul 30, 2021

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.

@Defite
Copy link

Defite commented Jul 30, 2021

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.

@guerrero
Copy link

@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.

@imaegoo
Copy link

imaegoo commented Sep 23, 2021

Solved by changing stats from 'none' to false.

https://webpack.js.org/configuration/stats/#stats-presets

@MartinFalatic
Copy link

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?

@pago
Copy link
Contributor

pago commented Jan 21, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests