]> cat aescling's git repositories - mastodon.git/commitdiff
Fix compression-webpack-plugin configuration (#16356)
authorClaire <claire.github-309c@sitedethib.com>
Fri, 25 Jun 2021 02:45:04 +0000 (04:45 +0200)
committerGitHub <noreply@github.com>
Fri, 25 Jun 2021 02:45:04 +0000 (04:45 +0200)
compression-webpack-plugin 6.0.0 has changed how filenames were generated,
so from #14892 onward (Mastodon v3.3.0 and later), compressed files were
output to a file named `.gz` instead of the correct filenames.

config/webpack/production.js

index f1d0dabae73837e12a0d37b088dec0d7ceb1c2e0..cd3d01035ccb882eb44cefaa6e241a77d76cf27c 100644 (file)
@@ -43,7 +43,7 @@ module.exports = merge(sharedConfig, {
 
   plugins: [
     new CompressionPlugin({
-      filename: '[path].gz[query]',
+      filename: '[path][base].gz[query]',
       cache: true,
       test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/,
     }),