amireh / happypack

Happiness in the form of faster webpack build times.
MIT License
4.23k stars 125 forks source link

chunkHash changes on every build #231

Open Dante-101 opened 6 years ago

Dante-101 commented 6 years ago

The chunkHash of all the output js files changes on every single build without changing my code.

Also, all my bundles and chunks are larger in size with happypack. The size of the output chunks also keeps changing from build to build with 1-3 kb difference in size for 200 kb js output. One thing that I noticed is that the lodash is not undergoing tree shaking with happypack which it does if I don't use happypack. It looks like babel-plugin-lodash doesn't have any effect with happypack.

I use this plugin with ts-loader and fork-ts-checker-webpack-plugin. Without happypack, everything works as expected.

My typescript loader:

new HappyPack({
    id: 'ts',
    threadPool: happyThreadPool,
    loaders: [
        babelLoader(options),
        {
            loader: 'ts-loader',
            options: {
                happyPackMode: true
            }
        }
    ]
})

My javascript loder:

new HappyPack({
    id: 'js',
    threadPool: happyThreadPool,
    loaders: [babelLoader(options)]
})

Here are my versions: "webpack": "4.6.0", "webpack-cli": "2.0.15", "ts-loader": "4.2.0", "typescript": "2.8.3", "happypack": "5.0.0"

Dante-101 commented 6 years ago

Update: my build surprisingly became faster without happypack. I am clueless what caused it.

Build Time: With happy pack: 13 secs Without happy pack: 8.5 secs