Skip to content

Commit 063ab42

Browse files
authored
Revert "Modernize hash in webpack"
1 parent a0d7805 commit 063ab42

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

webpack.config.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ module.exports = (env, argv) => {
449449
loader: "file-loader",
450450
type: "javascript/auto",
451451
options: {
452-
name: "[name].[fullhash:7].[ext]",
452+
name: "[name].[hash:7].[ext]",
453453
outputPath: ".",
454454
},
455455
},
@@ -461,7 +461,7 @@ module.exports = (env, argv) => {
461461
type: "javascript/auto",
462462
options: {
463463
// We deliberately override the name so it makes sense in debugging
464-
name: "opus-encoderWorker.min.[fullhash:7].[ext]",
464+
name: "opus-encoderWorker.min.[hash:7].[ext]",
465465
outputPath: ".",
466466
},
467467
},
@@ -489,7 +489,7 @@ module.exports = (env, argv) => {
489489
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
490490
options: {
491491
// We deliberately override the name so it makes sense in debugging
492-
name: "opus-decoderWorker.min.[fullhash:7].[ext]",
492+
name: "opus-decoderWorker.min.[hash:7].[ext]",
493493
outputPath: ".",
494494
},
495495
},
@@ -514,7 +514,7 @@ module.exports = (env, argv) => {
514514
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
515515
options: {
516516
// We deliberately override the name so it makes sense in debugging
517-
name: "wave-encoderWorker.min.[fullhash:7].[ext]",
517+
name: "wave-encoderWorker.min.[hash:7].[ext]",
518518
outputPath: ".",
519519
},
520520
},
@@ -525,7 +525,7 @@ module.exports = (env, argv) => {
525525
type: "javascript/auto",
526526
loader: "file-loader",
527527
options: {
528-
name: "i18n/[name].[fullhash:7].[ext]",
528+
name: "i18n/[name].[hash:7].[ext]",
529529
},
530530
},
531531
{
@@ -595,10 +595,10 @@ module.exports = (env, argv) => {
595595
loader: "file-loader",
596596
options: {
597597
esModule: false,
598-
name: "[name].[fullhash:7].[ext]",
598+
name: "[name].[hash:7].[ext]",
599599
outputPath: getAssetOutputPath,
600600
publicPath: function (url, resourcePath) {
601-
// CSS image usages end up in the `bundles/[fullhash]` output
601+
// CSS image usages end up in the `bundles/[hash]` output
602602
// directory, so we adjust the final path to navigate up
603603
// twice.
604604
const outputPath = getAssetOutputPath(url, resourcePath);
@@ -610,7 +610,7 @@ module.exports = (env, argv) => {
610610
},
611611
{
612612
test: /\.(gif|png|ttf|woff|woff2|xml|ico)$/,
613-
// Use a content-based fullhash in the name so that we can set a long cache
613+
// Use a content-based hash in the name so that we can set a long cache
614614
// lifetime for assets while still delivering changes quickly.
615615
oneOf: [
616616
{
@@ -619,10 +619,10 @@ module.exports = (env, argv) => {
619619
loader: "file-loader",
620620
options: {
621621
esModule: false,
622-
name: "[name].[fullhash:7].[ext]",
622+
name: "[name].[hash:7].[ext]",
623623
outputPath: getAssetOutputPath,
624624
publicPath: function (url, resourcePath) {
625-
// CSS image usages end up in the `bundles/[fullhash]` output
625+
// CSS image usages end up in the `bundles/[hash]` output
626626
// directory, so we adjust the final path to navigate up
627627
// twice.
628628
const outputPath = getAssetOutputPath(url, resourcePath);
@@ -653,8 +653,8 @@ module.exports = (env, argv) => {
653653

654654
// This exports our CSS using the splitChunks and loaders above.
655655
new MiniCssExtractPlugin({
656-
filename: useHMR ? "bundles/[name].css" : "bundles/[fullhash]/[name].css",
657-
chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[fullhash]/[name].css",
656+
filename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css",
657+
chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css",
658658
ignoreOrder: false, // Enable to remove warnings about conflicting order
659659
}),
660660

@@ -770,9 +770,9 @@ module.exports = (env, argv) => {
770770
// directory and symlink it into place - this allows users who loaded
771771
// an older version of the application to continue to access webpack
772772
// chunks even after the app is redeployed.
773-
filename: "bundles/[fullhash]/[name].js",
774-
chunkFilename: "bundles/[fullhash]/[name].js",
775-
webassemblyModuleFilename: "bundles/[fullhash]/[modulehash].wasm",
773+
filename: "bundles/[hash]/[name].js",
774+
chunkFilename: "bundles/[hash]/[name].js",
775+
webassemblyModuleFilename: "bundles/[hash]/[modulehash].wasm",
776776
},
777777

778778
// configuration for the webpack-dev-server

0 commit comments

Comments
 (0)