From c5ac9983b273e895e3b379d9eef439239804e162 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 27 May 2021 00:15:19 +0000 Subject: [PATCH] Build tools: Use hashed module IDs for minified files. Further improves webpack configuration for editor files to use hashed module IDs in the compressed (`*.min.js`) production files. Follow up to [50940]. Props gziolo, peterwilsoncc. Fixes #53192. git-svn-id: https://develop.svn.wordpress.org/trunk@51035 602fd350-edb4-49c9-b593-d223f7449a82 --- tools/webpack/packages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js index a2deeaf577..875eede7aa 100644 --- a/tools/webpack/packages.js +++ b/tools/webpack/packages.js @@ -293,7 +293,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil ], }, optimization: { - moduleIds: 'named', + moduleIds: mode === 'production' ? 'hashed' : 'named', }, plugins: [ new DefinePlugin( {