happypack icon indicating copy to clipboard operation
happypack copied to clipboard

chunkHash changes on every build

Open Dante-101 opened this issue 7 years ago • 1 comments
trafficstars

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 avatar Apr 29 '18 21:04 Dante-101

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

Dante-101 avatar May 03 '18 12:05 Dante-101