happypack
happypack copied to clipboard
Is this plugin useful now that Webpack 4 has a parallel option?
I noticed parallelism listed in Webpack 4's config. What benefit does HappyPack offer now that I'm seeing parallelism as a native Webpack config value?
Source: https://webpack.js.org/configuration/other-options/#parallelism
@Sawtaytoes That option seems to have to do with how many modules are processed on the main thread rather than on separate threads. Edit: However, due to how happypack can process many more modules at once, it may be logical to increase that to allow for happypack to really use those threads.
What would that look like? Currently, I have HappyPack using as many threads as are available in os.cpus().length
.
Well i see no improvement with webpack 4
I plan to remove it when upgrading webpack 4
I was about to post the same issue. In Task Manager monitoring tool, with Webpack 3 I noticed only one thread active. With webpack 4 I noticed 4 cores/ 8thread active when compiling. So is there still a benefit to using happypack with webpack 4?
I noticed, without using Happypack, that Webpack 4.16.4 is indeed using multiple threads:
I wanted to test whether using Happypack would result in decreased build time, however I wasn't able to make it work:
ERROR in ./index.tsx
Module build failed (from ../node_modules/happypack/loader.js):
Error: You may be using an old version of webpack; please check you're using at least version 4
even though I'm using webpack 4.
@grzegorzjudas Did you ever figure this out? I wanted to try the same experiment with adding Happypack to our Webpack 4 config, and am running into the exact same error.
webpack v4 take parallel process acquiescently
@mjlangan I did not - figured the semver/regex that detects the webpack version used in happypack is incorrect/out-of-date.
I recommend trying out most recent version of happypack and if it's still there, raising an issue for happypack. I removed happypack myself, since the most important thing for me (multithreading) is working just fine without it.