From dbee6d8d61f29489849c19b203e71cb54de80a19 Mon Sep 17 00:00:00 2001 From: John Dillick Date: Wed, 12 Apr 2023 16:44:31 -0400 Subject: [PATCH 1/3] Fix HMR Behavior post shell update. --- src/app/main.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/app/main.js b/src/app/main.js index 8bbcb7d..c5dd8c5 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -14,19 +14,10 @@ __webpack_public_path__ = window.resourceBaseUrl || '/assets/js/'; await AppError(error); } - /** - * @description Initialize the app. - */ if (module.hot) { - module.hot.accept( - [ - '../.././.core/dependencies/index.js', - '../.././.core/app.js', - '../.././.core/sdk/index.js', - ], - () => { - window.location.reload(); - }, - ); + module.hot.accept(['./main.js', '../../.core/app/shell'], cause => { + console.log(`${cause} triggered reload.`); + window.location.reload(); + }); } })(); From 213410ab71448af8dc4271bca6ff2a0433bb3bf1 Mon Sep 17 00:00:00 2001 From: John Dillick Date: Wed, 12 Apr 2023 16:55:16 -0400 Subject: [PATCH 2/3] Simplified HMR Version --- src/app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/main.js b/src/app/main.js index c5dd8c5..16a0d5b 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -15,7 +15,7 @@ __webpack_public_path__ = window.resourceBaseUrl || '/assets/js/'; } if (module.hot) { - module.hot.accept(['./main.js', '../../.core/app/shell'], cause => { + module.hot.accept(['../../.core/app/shell.js'], cause => { console.log(`${cause} triggered reload.`); window.location.reload(); }); From bce6a0c02ef58b87ea0d48eefc74cdd8faf529b8 Mon Sep 17 00:00:00 2001 From: John Dillick Date: Wed, 12 Apr 2023 16:57:27 -0400 Subject: [PATCH 3/3] Even More Simplified HMR Version --- src/app/main.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/main.js b/src/app/main.js index 16a0d5b..56ce957 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -15,9 +15,6 @@ __webpack_public_path__ = window.resourceBaseUrl || '/assets/js/'; } if (module.hot) { - module.hot.accept(['../../.core/app/shell.js'], cause => { - console.log(`${cause} triggered reload.`); - window.location.reload(); - }); + module.hot.accept(['../../.core/app/shell.js'], window.location.reload); } })();