From d718778fc1a5cb63d07865f5ae70743cfcece392 Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Mon, 9 Sep 2024 17:54:49 +0000 Subject: [PATCH] fix(bundle-size): increase deterministic id to 4 chars to be forward compatible with prism changes --- client/config/webpack.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/config/webpack.config.js b/client/config/webpack.config.js index d5b981b6a6ad..118e5b82b46c 100644 --- a/client/config/webpack.config.js +++ b/client/config/webpack.config.js @@ -162,7 +162,7 @@ function config(webpackEnv) { level: "none", }, optimization: { - chunkIds: isEnvProduction ? "deterministic" : "named", + chunkIds: isEnvProduction ? false : "named", moduleIds: isEnvProduction ? "deterministic" : "named", minimize: isEnvProduction, minimizer: [ @@ -519,6 +519,10 @@ function config(webpackEnv) { analyzerMode: "disabled", generateStatsFile: true, }), + isEnvProduction && + new webpack.ids.DeterministicChunkIdsPlugin({ + maxLength: 4, // this is actually min length + }), ].filter(Boolean), // Turn off performance processing because we utilize // our own hints via the FileSizeReporter