Skip to content

Commit

Permalink
Drop third party webpack-chunk-hash
Browse files Browse the repository at this point in the history
We noticed irregular behavior in the hashing of our ubndled auspice
files [1]. The webpack-chunk-hash (a.k.a. WebpackChunkHash) library
appears to have been abandoned by its developers with no commits in the
past 4 years. I'm not sure what purpose this library originally served,
but after taking a hint from Ivan, it appears that Webpack natively does
exactly what we want with respect to chunk hashing and content hashing.

Therefore, drop the third party webpack-chunk-hash library from our
webpack config in favor of the vanilla webpack API.

[1]: #1266
  • Loading branch information
kairstenfay committed Jan 22, 2021
1 parent d4364c7 commit 252399c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
10 changes: 1 addition & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -124,7 +124,6 @@
"typeface-lato": "^0.0.75",
"webpack": "^4.30.0",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-chunk-hash": "^0.6.0",
"webpack-cli": "^3.1.2",
"webpack-dev-middleware": "^3.1.3",
"webpack-hot-middleware": "^2.24.3",
Expand Down
2 changes: 0 additions & 2 deletions webpack.config.js
Expand Up @@ -6,7 +6,6 @@ const fs = require('fs');
const utils = require('./cli/utils');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const WebpackChunkHash = require('webpack-chunk-hash');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');

/* Webpack config generator */
Expand Down Expand Up @@ -97,7 +96,6 @@ const generateConfig = ({extensionPath, devMode=false, customOutputPath, analyze
] : [
new LodashModuleReplacementPlugin(),
pluginProcessEnvData,
new WebpackChunkHash({algorithm: 'md5'}),
pluginCompress,
pluginHtml,
cleanWebpackPlugin
Expand Down

0 comments on commit 252399c

Please sign in to comment.