Build: Use hashed/deterministic moduleIDs in webpack config

Props peterwilsoncc, desrosj.
Fixes #53192.



git-svn-id: https://develop.svn.wordpress.org/trunk@50940 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Greg Ziółkowski 2021-05-20 12:18:43 +00:00
parent 556ee6cd18
commit 8b04314900

View File

@ -292,6 +292,9 @@ module.exports = function( env = { environment: 'production', watch: false, buil
},
],
},
optimization: {
moduleIds: 'named',
},
plugins: [
new DefinePlugin( {
// Inject the `GUTENBERG_PHASE` global, used for feature flagging.
@ -364,7 +367,8 @@ module.exports = function( env = { environment: 'production', watch: false, buil
delete config.devtool;
config.mode = 'production';
config.optimization = {
minimize: false
minimize: false,
moduleIds: 'hashed',
};
}