From d7ded4d0cb577f4f29ed49fb29916e5044766203 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Thu, 1 Aug 2024 09:38:44 +0100 Subject: [PATCH] Move runtimeChunk optimisation to production webpack config (#18982) GitOrigin-RevId: 99b0923cee62118fbd69e234c16bf1eb0ace6abc --- services/web/webpack.config.dev.js | 6 ------ services/web/webpack.config.js | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/services/web/webpack.config.dev.js b/services/web/webpack.config.dev.js index ec9c2a4312..cfde0ef61c 100644 --- a/services/web/webpack.config.dev.js +++ b/services/web/webpack.config.dev.js @@ -93,10 +93,4 @@ module.exports = merge(base, { preset: 'minimal', colors: true, }, - - optimization: { - runtimeChunk: { - name: 'runtime', - }, - }, }) diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index de50a0254c..c1c95a902c 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -110,6 +110,10 @@ module.exports = { splitChunks: { chunks: 'all', // allow non-async chunks to be analysed for shared modules }, + // https://webpack.js.org/configuration/optimization/#optimizationruntimechunk + runtimeChunk: { + name: 'runtime', + }, }, // Define how file types are handled by webpack