From 0e1a46a6de628f1452ec7329a30fe3973b3f9047 Mon Sep 17 00:00:00 2001 From: Colin Rudd Date: Mon, 5 Feb 2024 12:41:46 -0500 Subject: [PATCH] #29 - Fixed chunk collection so that similarly named apps within a project do not load each other's app chunk. --- CHANGELOG.md | 6 ++++++ configureWebpack.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e10ce0c..b47c7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v8.0-SNAPSHOT + +### 🐞 Bug Fixes + +* Fixed chunk collection so that similarly named apps within a project do not load each other's app chunk. + ## v7.0.0 - 2023-07-19 * Updated `@xh/eslint-config` to v6.0, for use with Typescript v5.1+ and Hoist React v59+. diff --git a/configureWebpack.js b/configureWebpack.js index 30d82b8..762acc1 100644 --- a/configureWebpack.js +++ b/configureWebpack.js @@ -659,7 +659,7 @@ async function configureWebpack(env) { template: path.resolve(hoistPath, `static/index-manifest.html`), filename: `${jsAppName}/index.html`, // Only include chunks that contain the js app name - chunks: chunkNames.filter(it => it.includes(jsAppName)), + chunks: chunkNames.filter(it => it.startsWith(jsAppName) || it.includes('~' + jsAppName)), // No need to minify the HTML itself minify: false, // Flag read within template file to include apple icon.